<template>
  <!-- 用户管理 -->
  <div>
    <!-- 搜索页面 -->
    <div v-if="dialog">
      <el-form
        :model="personalInformationSearch"
        size="small"
        :inline="true"
        class="query-form"
      >
        <el-form-item prop="name">
          <el-input
            size="small"
            v-model="personalInformationSearch.name"
            autocomplete="off"
            placeholder="姓名"
          ></el-input>
        </el-form-item>
        <el-form-item prop="idCard">
          <el-input
            size="small"
            v-model="personalInformationSearch.idCard"
            autocomplete="off"
            placeholder="身份证号"
          ></el-input>
        </el-form-item>
        <el-form-item prop="phone">
          <el-input
            size="small"
            v-model="personalInformationSearch.phone"
            autocomplete="off"
            maxlength="11"
            placeholder="电话"
          ></el-input>
        </el-form-item>
        <el-form-item prop="degree">
          <el-select
            v-model="personalInformationSearch.degree"
            placeholder="请选择学历"
            style="width: 100%"
          >
            <el-option
              v-for="(item, index) in status_education"
              :label="item.label"
              :key="index"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item prop="post">
          <el-select
            v-model="personalInformationSearch.post"
            placeholder="请选择岗位"
            style="width: 100%"
          >
            <el-option
              v-for="(item, index) in findPost"
              :label="item.name"
              :key="index"
              :value="item.name"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item prop="workingyears">
          <el-input
            size="small"
            v-model="personalInformationSearch.workingyears"
            autocomplete="off"
            maxlength="11"
            placeholder="工作经验(年限)"
          ></el-input>
        </el-form-item>
        <el-form-item prop="office">
          <el-select
            v-model="personalInformationSearch.office"
            placeholder="请选择部门"
            style="width: 100%"
            size="small"
          >
            <el-option
              v-for="(item, index) in offices"
              :label="item.name"
              :value="item.id"
              :key="index"
            ></el-option>
          </el-select>
        </el-form-item>
        <!-- <el-form-item prop="major">
          <el-input
            size="small"
            v-model="personalInformationSearch.major"
            autocomplete="off"
            maxlength="11"
            placeholder="专业"
          ></el-input>
        </el-form-item> -->
        <el-form-item style="float: right">
          <el-button size="small" type="primary" @click="getuserInforAll"
            >查询</el-button
          >
          <el-button
            size="small"
            style="margin-left: 10px"
            @click="resetPersonSearch"
            >重置</el-button
          >
        </el-form-item>
      </el-form>
    </div>
    <div style="background-color: #fff; padding: 10px">
      <!-- 按钮 -->
      <div>
        <el-button
          size="small"
          icon="el-icon-circle-close"
          @click="toggleSelection()"
          >取消选择</el-button
        >
        <el-button
          type="text"
          style="float: right; font-size: 12px"
          @click="setDialog"
          >{{ dialog ? "收 起" : "展 开"
          }}<i
            :class="dialog ? 'el-icon-caret-bottom' : 'el-icon-caret-right'"
          ></i
        ></el-button>
      </div>
      <!-- 用户管理数据表格 -->
      <div style="margin-top: 10px">
        <el-table
          :data="userInforAllTable"
          @selection-change="selectuserInforAll"
          height="calc(100% - 80px)"
          size="small"
          ref="userInforAll"
          :cell-style="cellStyle"
          style="border: 1px solid #d6cfe2; min-height: 380px"
          :header-cell-class-name="cellHeadStyle"
          :row-class-name="tableRowClassName"
          :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
          v-loading="userInforAllLoading"
          row-key="id"
          class="table"
        >
          <el-table-column
            type="selection"
            width="55"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            align="center"
            width="80"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
              <el-link  type="primary" :underline="false"   @click="listdetails(scope.row)">{{scope.row.name}}</el-link>
            </template>
          </el-table-column>
          <el-table-column
            prop="sex"
            label="性别"
            align="center"
            width="60"
            :formatter="formatterSex"
            show-overflow-tooltip
          >
          </el-table-column>
          <el-table-column prop="phone" label="电话" width="110" show-overflow-tooltip>
					    <template slot-scope="scope">{{scope.row.phone?scope.row.phone.replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3"):""}}</template>
                    </el-table-column>
          <el-table-column
            prop="email"
            label="邮箱"
            width="230"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="company.name"
            label="归属公司"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="office.name"
            label="归属部门"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="currentaddress"
            label="现住址"
            show-overflow-tooltip
          ></el-table-column>
          <!-- <el-table-column
            fixed="right"
            label="操作"
            width="100"
            align="center"
          >
            <template slot-scope="scope">
              <el-button
                type="text"
                icon="el-icon-view"
                size="mini"
                @click="listdetails(scope.row)"
                >查看</el-button
              >
            </template>
          </el-table-column> -->
        </el-table>
        <el-pagination
          @size-change="userInforAllHandleSize"
          @current-change="userInforAllCurrent"
          :current-page.sync="userInforAllPageNo"
          :page-size="userInforAllPageSize"
          layout="total, prev, pager, next, jumper"
          :total="userInforAllTotal"
          style="margin: 1rem 0"
        >
        </el-pagination>

        <el-dialog
          title="个人信息"
          width="98%"
          :visible.sync="insertUserpersonal"
        >
          <el-form ref="essential" :model="essential">
            <el-row style="margin: 10px 0">
              <el-col
                ><span style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                  ><i class="el-icon-menu"></i>人员信息：</span
                ></el-col
              >
            </el-row>
            <el-row>
              <el-col :span="10">
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="name"
                    label="姓名："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.name"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="sex"
                    label="性别："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.sex"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="company.name"
                    label="公司："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.company.name"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="office.name"
                    label="部门："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.office.name"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="nativeplace"
                    label="户籍："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.nativeplace"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="nation"
                    label="民族："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.nation"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="higesteducation"
                    label="学历："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.higesteducation"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="higesteducationmajor"
                    label="专业："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.higesteducationmajor"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-col>
              <el-col :span="14">
                <el-col :span="19">
                  <el-col :span="12">
                    <el-form-item
                      size="small"
                      prop="phone"
                      label="电话："
                      :label-width="formLabelWidth_People"
                    >
                      <el-input
                        v-model="essential.phone"
                        autocomplete="off"
                        disabled
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item
                      size="small"
                      prop="idCard"
                      label="身份证："
                      :label-width="formLabelWidth_People"
                    >
                      <el-input
                        v-model="essential.idCard"
                        autocomplete="off"
                        maxlength="18"
                        disabled
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item
                      size="small"
                      prop="post.name"
                      label="岗位："
                      :label-width="formLabelWidth_People"
                    >
                      <el-input
                        v-model="essential.post.name"
                        autocomplete="off"
                        disabled
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item
                      size="small"
                      prop="datebirth"
                      label="出生日期："
                      :label-width="formLabelWidth_People"
                    >
                      <el-input
                        v-model="essential.datebirth"
                        autocomplete="off"
                        disabled
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item
                      size="small"
                      prop="email"
                      label="邮箱："
                      :label-width="formLabelWidth_People"
                    >
                      <el-input
                        v-model="essential.email"
                        autocomplete="off"
                        disabled
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item
                      size="small"
                      prop="politicaloutlook"
                      label="政治面貌："
                      :label-width="formLabelWidth_People"
                    >
                      <el-input
                        v-model="essential.politicaloutlook"
                        autocomplete="off"
                        disabled
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item
                      size="small"
                      prop="interest"
                      label="兴趣："
                      :label-width="formLabelWidth_People"
                    >
                      <el-input
                        v-model="essential.interest"
                        autocomplete="off"
                        disabled
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item
                      size="small"
                      prop="higesteducationschool"
                      label="毕业院校："
                      :label-width="formLabelWidth_People"
                    >
                      <el-input
                        v-model="essential.higesteducationschool"
                        autocomplete="off"
                        disabled
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-col>
                <el-col :span="5">
                  <img
                    :src="essential.photo"
                    style="
                      margin-left: 1rem;
                      border: 1px solid #d8d8d8;
                      border-radius: 5px;
                      height: 178px;
                      width: 75%;
                    "
                  />
                </el-col>
              </el-col>
            </el-row>
            <el-row type="flex">
              <el-col :span="10">
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="drivinglicense"
                    label="驾照："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.drivinglicense"
                      autocomplete="off"
                      maxlength="18"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="bankaccount"
                    label="银行卡号："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.bankaccount"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="staffstatus"
                    label="工作类型："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.staffstatus"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="workingYears"
                    label="工作经验："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.workingyears"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="emergcyphone"
                    label="紧急联系人："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.emergcyphone"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="emergcyphone"
                    label="联系人电话："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.emergcyphone"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-col>

              <el-col :span="14">
                <el-col :span="10" style="width: 39.8%">
                  <el-form-item
                    size="small"
                    prop="banknumber"
                    label="银行行号："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.banknumber"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="14">
                  <el-form-item
                    size="small"
                    prop="bankofdeposit"
                    label="银行开户行："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.bankofdeposit"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24" style="width: 98%">
                  <el-form-item
                    size="small"
                    prop="currentaddress"
                    label="地址："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.currentaddress"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24" style="width: 98%">
                  <el-form-item
                    size="small"
                    prop="currentaddress"
                    label="详细地址："
                    :label-width="formLabelWidth_People"
                  >
                    <el-input
                      v-model="essential.currentaddress"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-col>
            </el-row>
            <el-row style="margin: 10px 0">
              <el-col
                ><span style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                  ><i class="el-icon-menu"></i>转正信息：</span
                ></el-col
              >
            </el-row>
            <el-row>
              <el-table
                height="auto"
                :cell-style="cellStyle"
                :header-cell-class-name="cellHeadStyle"
                ref="FindRuzhi"
                :data="FindRuzhi"
                :row-class-name="tableRowClassName"
                :tree-props="{
                  children: 'children',
                  hasChildren: 'hasChildren',
                }"
                :row-style="{ height: '20' }"
                style="min-height: 60px; border: 1px solid #d6cfe2"
              >
                <el-table-column
                  prop="probationperiod"
                  label="试用期时长"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="begintime"
                  label="入职日期"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="endtime"
                  label="转正日期"
                  show-overflow-tooltip
                ></el-table-column>
              </el-table>
            </el-row>

            <el-row style="margin: 10px 0">
              <el-col
                ><span style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                  ><i class="el-icon-menu"></i>调岗记录：</span
                ></el-col
              >
            </el-row>
            <el-row>
              <el-table
                height="auto"
                :cell-style="cellStyle"
                :header-cell-class-name="cellHeadStyle"
                ref="JobTransfer"
                :data="JobTransfer"
                :row-class-name="tableRowClassName"
                :tree-props="{
                  children: 'children',
                  hasChildren: 'hasChildren',
                }"
                :row-style="{ height: '20' }"
                style="min-height: 60px; border: 1px solid #d6cfe2"
              >
                <el-table-column
                  prop="record"
                  label="调岗记录"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="createDate"
                  label="调岗日期"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="department.name"
                  label="部门"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="job"
                  label="岗位"
                  show-overflow-tooltip
                ></el-table-column>
              </el-table>
            </el-row>

            <el-row style="margin: 10px 0">
              <el-col
                ><span style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                  ><i class="el-icon-menu"></i>家庭情况：</span
                ></el-col
              >
            </el-row>
            <el-row>
              <el-table
                height="auto"
                :cell-style="cellStyle"
                :header-cell-class-name="cellHeadStyle"
                ref="FamilySituation"
                :data="FamilySituation"
                :row-class-name="tableRowClassName"
                :tree-props="{
                  children: 'children',
                  hasChildren: 'hasChildren',
                }"
                :row-style="{ height: '20' }"
                style="min-height: 60px; border: 1px solid #d6cfe2"
              >
                <el-table-column
                  prop="relationship"
                  label="关系"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="name"
                  label="姓名"
                  align="center"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="phone"
                  label="联系方式"
                  show-overflow-tooltip
                ></el-table-column>
              </el-table>
            </el-row>
            <el-row style="margin: 10px 0">
              <el-col
                ><span style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                  ><i class="el-icon-menu"></i>工作经历：</span
                ></el-col
              >
            </el-row>
            <el-row>
              <el-table
                height="auto"
                :cell-style="cellStyle"
                :header-cell-class-name="cellHeadStyle"
                ref="WorkExperience"
                :data="WorkExperience"
                :row-class-name="tableRowClassName"
                :tree-props="{
                  children: 'children',
                  hasChildren: 'hasChildren',
                }"
                :row-style="{ height: '20' }"
                style="min-height: 60px; border: 1px solid #d6cfe2"
              >
                <el-table-column
                  prop="postname"
                  label="岗位"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="companyname"
                  label="单位名称"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="departement"
                  label="部门"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="starttime"
                  label="入职时间"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="endtime"
                  label="离职时间"
                  show-overflow-tooltip
                ></el-table-column>
              </el-table>
            </el-row>
            <el-row style="margin: 10px 0">
              <el-col
                ><span style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                  ><i class="el-icon-menu"></i>教育经历：</span
                ></el-col
              >
            </el-row>
            <el-row>
              <el-table
                height="auto"
                :cell-style="cellStyle"
                :header-cell-class-name="cellHeadStyle"
                ref="Educational"
                :data="Educational"
                :row-class-name="tableRowClassName"
                :tree-props="{
                  children: 'children',
                  hasChildren: 'hasChildren',
                }"
                :row-style="{ height: '20' }"
                style="min-height: 60px; border: 1px solid #d6cfe2"
              >
                <el-table-column
                  prop="school"
                  label="毕业院校"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="major"
                  label="专业"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="academicdegree"
                  label="学历"
                  show-overflow-tooltip
                >
                  <template slot-scope="scope">
                      {{ $dictUtils.getDictLabel("nature", scope.row.academicdegree, '-') }}
                  </template>
                </el-table-column>
                <el-table-column
                  prop="admissiondate"
                  label="入学时间"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="graduationdate"
                  label="毕业时间"
                  show-overflow-tooltip
                ></el-table-column>
              </el-table>
            </el-row>
          </el-form>
        </el-dialog>
      </div>
      <!-- 附表选项卡 -->
      <el-tabs
        type="border-card"
        @tab-click="handleClick"
        v-model="attachedListNum"
        style="margin-top: 20px"
      >
        <el-tab-pane label="资质证书">
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="qualiFicationDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="deleteQualiFication"
              :disabled="checkqualiFication.length <= 0"
              >删除
            </el-button>
            <el-button
              size="small"
              icon="el-icon-circle-close"
              @click="toggleSelections()"
              >取消选择
            </el-button>
          </div>
          <el-table
            :data="qualiFicationTable"
            height="calc(100% - 80px)"
            size="small"
            ref="qualiFicationTog"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="qualiFicationLoading"
            row-key="id"
            @selection-change="qualiFicationChange"
          >
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="user.name"
              label="姓名"
              align="center"
              width="80"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="certificationdescribe"
              label="资格证描述"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="certificationfile"
              label="资格证照片"
              show-overflow-tooltip
            >
              <template slot-scope="scope" v-if="scope.row.certificationfile">
                  <a
                    :href="item"
                    target="_blank"
                    :key="index"
                    v-for="(item, index) in scope.row.certificationfile.split('|')"
                  >
                    {{
                      decodeURIComponent(
                        item.substring(item.lastIndexOf("/") + 1)
                      )
                    }}
                  </a>
              </template>
            </el-table-column>
            <el-table-column
              fixed="right"
              align="center"
              label="操作"
              width="120"
            >
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="redactqualiFication(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="deleteQualiFication(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 资质证书分页 -->
          <el-pagination
            @size-change="qualiFicationHandleSize"
            @current-change="qualiFicationHandleCurrent"
            :current-page.sync="qualiFicationPageNo"
            :page-size="qualiFicationPageSize"
            layout="total, prev, pager, next, jumper"
            :total="qualiFicationTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <!-- 新增、编辑资质证书 -->
          <el-dialog
            title="资质证书"
            :visible.sync="qualiFicationDialog"
            width="50%"
          >
            <el-form
              :model="qualiFicationList"
              size="small"
              ref="qualiFicationList"
            >
              <el-row :gutter="15">
                <el-col :span="24">
                  <el-form-item
                    label="资质证书描述"
                    prop="describe"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '资质证书描述不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="qualiFicationList.describe"
                      placeholder="请填写资质证书描述"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="资质证书文件"
                    prop="certificate"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '资质证书附件不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                      <!-- :on-preview="
                        (file, fileList) => {
                          $window.location.href =
                            (file.response && file.response.url) || file.url;
                        }
                      " -->
                    <el-upload
                      ref="logo"
                      :action="`${this.$http.BASE_URL}/dlyrlTest/fileUpload`"
                      :headers="{ token: $cookie.get('token') }"
                      :on-preview="(file) => {$window.open ((file.response && file.response.url) || file.url,'_blank') }"
                      :on-success="
                        (response, file, fileList) => {
                          qualiFicationList.certificate = fileList
                            .map(
                              (item) =>
                                (item.response && item.response.url) || item.url
                            )
                            .join('|');
                        }
                      "
                      :on-remove="
                        (file, fileList) => {
                          $http
                            .post(
                              `/dlyrlTest/deleteFile?path=${
                                (file.response && file.response.url) || file.url
                              }`
                            )
                            .then(({ data }) => {
                              $message.success(data.msg);
                            });
                          qualiFicationList.certificate = fileList
                            .map((item) => item.url)
                            .join('|');
                        }
                      "
                      :before-remove="
                        (file, fileList) => {
                          return $confirm(`确定移除 ${file.name}？`);
                        }
                      "
                      multiple
                      :limit="5"
                      :on-exceed="
                        (files, fileList) => {
                          $message.warning(
                            `当前限制选择 5 个文件，本次选择了 ${
                              files.length
                            } 个文件，共选择了 ${
                              files.length + fileList.length
                            } 个文件`
                          );
                        }
                      "
                      :file-list="qualiFicationList.fileList"
                    >
                      <el-button size="small" type="primary"
                        >点击上传</el-button
                      >
                      <div slot="tip" class="el-upload__tip">添加相关附件</div>
                    </el-upload>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="qualiFicationDialog = false"
                >关闭</el-button
              >
              <el-button size="small" type="primary" @click="saveQualiFication"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="体检报告">
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="findMedicalDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="deleteFindMedical"
              :disabled="checkfindMedical.length <= 0"
              >删除
            </el-button>
            <el-button
              size="small"
              icon="el-icon-circle-close"
              @click="toggleSelections()"
              >取消选择
            </el-button>
          </div>
          <el-table
            :data="findMedicalTable"
            height="calc(100% - 80px)"
            size="small"
            ref="findMedicalTog"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="findMedicalLoading"
            row-key="id"
            @selection-change="findMedicalChange"
          >
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="user.name"
              label="姓名"
              align="center"
              fixed="left"
              width="80"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="medicalarea"
              label="体检医院"
              width="250"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="detailedaddress"
              label="体检地点"
              width="250"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="medicaldate"
              label="体检日期"
              width="200"
            ></el-table-column>
            <el-table-column
              prop="summary"
              label="汇总分析"
              width="250"
            ></el-table-column>
            <el-table-column
              prop="medicaltype"
              label="体检类型"
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("medical_type", scope.row.medicaltype, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              prop="medicalname"
              label="体检名称"
            ></el-table-column>
            <el-table-column
              prop="level"
              label="医院等级"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("hospital_type", scope.row.level, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              fixed="right"
              align="center"
              label="操作"
              width="120"
            >
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="redactfindMedical(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="deleteFindMedical(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 体检报告分页 -->
          <el-pagination
            @size-change="findMedicalHandleSize"
            @current-change="findMedicalHandleCurrent"
            :current-page.sync="findMedicalPageNo"
            :page-size="findMedicalPageSize"
            layout="total, prev, pager, next, jumper"
            :total="findMedicalTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <!-- 体检报告新增、编辑 -->
          <el-dialog
            title="体检报告"
            :visible.sync="findMedicalDialog"
            width="50%"
          >
            <el-form
              :model="findMedicalList"
              size="small"
              ref="findMedicalList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    label="体检名称"
                    prop="medicalname"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '体检名称不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="findMedicalList.medicalname"
                      placeholder="请填写体检名称"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="体检日期"
                    prop="medicaldate"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '体检日期不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-input v-model="findMedicalList.medicaldate" placeholder="请填写体检名称"></el-input> -->
                    <el-date-picker
                      style="width: 100%"
                      v-model="findMedicalList.medicaldate"
                      type="datetime"
                      format="yyyy-MM-dd hh:mm:ss"
                      value-format="yyyy-MM-dd hh:mm:ss"
                      placeholder="选择日期时间"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="汇总分析"
                    prop="summary"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '汇总分析不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="findMedicalList.summary"
                      placeholder="请填写汇总分析"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="体检医院"
                    prop="medicalarea"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '体检医院不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="findMedicalList.medicalarea"
                      placeholder="请填写体检医院"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="详细地址"
                    prop="detailedaddress"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '详细地址不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="findMedicalList.detailedaddress"
                      placeholder="请填写详细地址"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="医院等级"
                    prop="level"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '医院等级不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-input v-model="findMedicalList.level" placeholder="请填写医院等级"></el-input> -->
                    <el-select
                      v-model="findMedicalList.level"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in hospital"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="体检类型"
                    prop="medicaltype"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '体检类型不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-input v-model="findMedicalList.medicaltype" placeholder="请填写体检类型"></el-input> -->
                    <el-select
                      v-model="findMedicalList.medicaltype"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="findMedicalDialog = false"
                >关闭</el-button
              >
              <el-button size="small" type="primary" @click="saveFindMedical"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="工伤记录">
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="findUserInjuryDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="deleteFindUserInjury"
              :disabled="checkfindUserInjury.length <= 0"
              >删除
            </el-button>
            <el-button
              size="small"
              icon="el-icon-circle-close"
              @click="toggleSelections()"
              >取消选择
            </el-button>
          </div>
          <el-table
            :data="findUserInjuryTable"
            height="calc(100% - 80px)"
            size="small"
            ref="findUserInjuryTog"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="findUserInjuryLoading"
            row-key="id"
            @selection-change="findUserInjuryChange"
          >
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="user.name"
              label="姓名"
              align="center"
              fixed="left"
              width="80"
            ></el-table-column>
            <el-table-column prop="idcard" label="身份证号" width="110" show-overflow-tooltip>
					<template slot-scope="scope">{{scope.row.idcard? scope.row.idcard.replace(/^(\d{4})\d+(\d{4})$/,"$1****$2"):""}}</template>
				</el-table-column>
            <el-table-column
              prop="companyname.name"
              label="公司名称"
              width="250"
            ></el-table-column>
            <el-table-column
              prop="createDate"
              label="创建时间"
              width="200"
            ></el-table-column>
            <el-table-column
              prop="time"
              label="发生时间"
              width="200"
            ></el-table-column>
            <el-table-column
              prop="commercialocation"
              label="工伤发生地点"
              width="250"
            ></el-table-column>
            <el-table-column
              prop="businesslevel"
              label="工伤等级"
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("business_level", scope.row.businesslevel, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              prop="medicaldiagnosis"
              label="医学诊断附件"
              width="200"
              show-overflow-tooltip
            >
               <template slot-scope="scope" v-if="scope.row.medicaldiagnosis">
                  <a
                    :href="item"
                    target="_blank"
                    :key="index"
                    v-for="(item, index) in scope.row.medicaldiagnosis.split('|')"
                  >
                    {{
                      decodeURIComponent(
                        item.substring(item.lastIndexOf("/") + 1)
                      )
                    }}
                  </a>
              </template>
            </el-table-column>
            <el-table-column
              prop="medicaldiagnosisresult"
              label="医学诊断结果"
              width="250"
            ></el-table-column>
            <el-table-column
              fixed="right"
              align="center"
              label="操作"
              width="120"
            >
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="redactfindUserInjury(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="deleteFindUserInjury(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 体检报告分页 -->
          <el-pagination
            @size-change="findUserInjuryHandleSize"
            @current-change="findUserInjuryHandleCurrent"
            :current-page.sync="findUserInjuryPageNo"
            :page-size="findUserInjuryPageSize"
            layout="total, prev, pager, next, jumper"
            :total="findUserInjuryTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <!-- 体检报告新增、编辑 -->
          <el-dialog
            title="工伤记录"
            :visible.sync="findUserInjuryDialog"
            width="50%"
          >
            <el-form ref="findUserInjuryList" :model="findUserInjuryList">
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="time"
                    label="发生时间"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请选择发生时间',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="findUserInjuryList.time"
                      type="datetime"
                      format="yyyy-MM-dd hh:mm:ss"
                      value-format="yyyy-MM-dd hh:mm:ss"
                      style="width: 100%"
                      placeholder="选择日期时间"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="commercialocation"
                    label="工伤发生地点"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入工伤发生地点',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="findUserInjuryList.commercialocation"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="businesslevel"
                    label="工伤等级"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入工伤等级',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-select
                      v-model="findUserInjuryList.businesslevel"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in options_bus"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="medicaldiagnosisresult"
                    label="医学诊断结果"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入医学诊断结果',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="findUserInjuryList.medicaldiagnosisresult"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="medicaldiagnosis"
                    label="医学诊断附件"
                    label-width="110px"
                    :rules="[
                      {
                        required: false,
                        message: '请上传医学诊断附件',
                        trigger: 'blur',
                      },
                    ]"
                  >
                         <!-- :on-preview="
                        (file, fileList) => {
                          $window.location.href =
                            (file.response && file.response.url) || file.url;
                        }
                      " -->
                    <el-upload
                      ref="logo"
                      :action="`${this.$http.BASE_URL}/dlyrlTest/fileUpload`"
                      :headers="{ token: $cookie.get('token') }"
                      :on-preview="(file) => {$window.open ((file.response && file.response.url) || file.url,'_blank') }"
                      :on-success="
                        (response, file, fileList) => {
                          findUserInjuryList.medicaldiagnosis = fileList
                            .map(
                              (item) =>
                                (item.response && item.response.url) || item.url
                            )
                            .join('|');
                        }
                      "
                      :on-remove="
                        (file, fileList) => {
                          $http
                            .post(
                              `/dlyrlTest/deleteFile?path=${
                                (file.response && file.response.url) || file.url
                              }`
                            )
                            .then(({ data }) => {
                              $message.success(data.msg);
                            });
                          findUserInjuryList.medicaldiagnosis = fileList
                            .map((item) => item.url)
                            .join('|');
                        }
                      "
                      :before-remove="
                        (file, fileList) => {
                          return $confirm(`确定移除 ${file.name}？`);
                        }
                      "
                      multiple
                      :limit="5"
                      :on-exceed="
                        (files, fileList) => {
                          $message.warning(
                            `当前限制选择 5 个文件，本次选择了 ${
                              files.length
                            } 个文件，共选择了 ${
                              files.length + fileList.length
                            } 个文件`
                          );
                        }
                      "
                      :file-list="findUserInjuryList.fileList"
                    >
                      <el-button size="small" type="primary"
                        >点击上传</el-button
                      >
                      <div slot="tip" class="el-upload__tip">添加相关附件</div>
                    </el-upload>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <div slot="footer" class="dialog-footer">
              <el-button size="small" @click="findUserInjuryDialog = false"
                >取 消</el-button
              >
              <el-button size="small" type="primary" @click="savaFindUserInjury"
                >确 定</el-button
              >
            </div>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="工资表">
          <!-- 工资表按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="addSalaryByUserDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="delpayroll"
              :disabled="checkpayroll.length <= 0"
              >删除
            </el-button>
            <el-button
              size="small"
              icon="el-icon-circle-close"
              @click="toggleSelections()"
              >取消选择
            </el-button>
            <el-date-picker
              style="margin-left: 10px"
              v-model="payrollPickerValue"
              format="yyyy-MM"
              value-format="yyyy-MM"
              type="month"
              size="small"
              @change="payrollPicker"
              :clearable="false"
            >
            </el-date-picker>
          </div>
          <!-- 工资表数据表格 -->
          <el-table
            :data="payrollTable"
            height="calc(100% - 80px)"
            size="small"
            :summary-method="getSummaries"
            show-summary
            @selection-change="payrolls"
            ref="payrollTog"
            :cell-style="cellStyle"
            style="border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
              max-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="payrollloading"
            row-key="id"
          >
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="salyear"
              label="日期"
              fixed="left"
              align="center"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
                prop="user.name"
                label="姓名"
                fixed="left"
                align="center"
                show-overflow-tooltip
                width="80"
              ></el-table-column>
            <el-table-column label="基本信息">
              <el-table-column
                prop="idnumber.name"
                label="部门"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="job"
                label="岗位"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
            </el-table-column>
            <el-table-column label="考勤 (天)">
              <el-table-column
                prop="shouldattendanceday"
                label="应出勤"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="traveldays"
                label="出差"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="leavedays"
                label="请假"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="realityattendanceday"
                label="实际出勤"
                show-overflow-tooltip
                align="center"
              ></el-table-column>
            </el-table-column>
            <el-table-column label="固定工资 (元)">
              <el-table-column
                prop="basepay"
                label="基本工资"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="postwage"
                label="岗位工资"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="meritpay"
                label="绩效工资"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="combinedbasic"
                label="固定合计"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
            </el-table-column>
            <el-table-column label="福利待遇 (元)">
              <el-table-column
                prop="senioritypay"
                label="工龄工资"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="mealallowance"
                label="餐费补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="trafficallowance"
                label="交通补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="commission"
                label="业务提成"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="travelallowance"
                label="出差补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="attendancebonus"
                label="全勤奖"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="overtime"
                label="加班费"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="communicatesubsidy"
                label="通信补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="othersupport"
                label="其他补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="totalwelfarebenefits"
                label="福利合计"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
            </el-table-column>
            <el-table-column
              prop="shouldsalary"
              label="应发工资(元)"
              width="100px"
              align="center"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column label="扣减项目 (元)">
              <el-table-column
                prop="housingprovidentfund"
                label="公积金"
                align="center"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="party"
                label="党费"
                align="center"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="basicoldagepension"
                label="基本养老"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="basicmedicalcare"
                label="基本医疗"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="unemploymentinsurance"
                label="失业保险"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="individualincometax"
                label="所得税"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="workInjury"
                label="工伤"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="lately"
                label="迟到"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="leaveearly"
                label="早退"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="absenteeism"
                label="旷工"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="otherdeductions"
                label="其他扣款"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="deductionscombined"
                label="扣减合计"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
            </el-table-column>
            <el-table-column label="企业保险 (元)">
              <el-table-column
                prop="providentFund"
                label="企业公积金"
                width="100px"
                align="center"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="pension"
                label="企业养老"
                align="center"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="medical"
                label="企业医疗"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="unemployment"
                label="企业失业"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="businessInjury"
                label="企业工伤"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="otherFee"
                label="企业其他费用"
                align="center"
                width="110px"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="totalFees"
                label="企业费用合计"
                align="center"
                width="110px"
                show-overflow-tooltip
              ></el-table-column>
            </el-table-column>
            <el-table-column
                prop="netpayroll"
                label="实发工资(元)"
                align="center"
                width="100px"
                show-overflow-tooltip
              ></el-table-column>
            <el-table-column fixed="right" label="操作" width="120">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="redactpayroll(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delpayroll(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 工资表分页 -->
          <el-pagination
            @size-change="payrollHandleSize"
            @current-change="payrollHandleCurrent"
            :current-page.sync="payrollPageNo"
            :page-size="payrollPageSize"
            layout="total, prev, pager, next, jumper"
            :total="payrollTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <el-dialog
            title="薪资信息"
            :visible.sync="addSalaryByUserDialog"
            width="75%"
          >
            <el-form
              ref="addSalaryByUser"
              :model="addSalaryByUser"
              :rules="rule"
            >
              <el-row style="margin-bottom: 10px">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>基本信息：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="salyear"
                    label="日期："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-date-picker
                      v-model="addSalaryByUser.salyear"
                      format="yyyy-MM"
                      value-format="yyyy-MM"
                      type="month"
                      placeholder="选择日期"
                      style="width: 100%"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="username"
                    label="姓名："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.username"
                      autocomplete="off"
                      placeholder="姓名"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="phone"
                    label="电话："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.phone"
                      maxlength="11"
                      placeholder="电话"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="idcard"
                    label="身份证号："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.idcard"
                      maxlength="18"
                      placeholder="身份证"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="6">
                  <!-- <el-form-item size="small" prop="department" label="部门：" :label-width="formLabelWidth_Salary">
                                <el-input v-model="addSalaryByUser.department" autocomplete="off" v-on:click.native="Select_Peo" placeholder="请选择部门"></el-input>
                            </el-form-item> -->
                  <el-form-item
                    size="small"
                    prop="idnumber.name"
                    label="部门："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.idnumber.name"
                      autocomplete="off"
                      placeholder="部门"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="job.name"
                    label="岗位："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.job.name"
                      autocomplete="off"
                      placeholder="岗位"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="bankaccount"
                    label="银行卡号："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.bankaccount"
                      maxlength="18"
                      placeholder="银行卡号"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="banknumber"
                    label="银行行号："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.banknumber"
                      placeholder="银行行号"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="bankofdeposit"
                    label="银行开户行："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.bankofdeposit"
                      placeholder="银行开户行"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>考勤 (天)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="shouldattendanceday"
                    label="应出勤："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.shouldattendanceday"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="traveldays"
                    label="出差："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.traveldays"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="leavedays"
                    label="请假："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.leavedays"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="realityattendanceday"
                    label="实际出勤："
                    :label-width="formLabelWidth_Salary"
                  >
                    <span
                      >{{
                        Number(
                          this.addSalaryByUser.realityattendanceday -
                            this.addSalaryByUser.traveldays -
                            this.addSalaryByUser.leavedays
                        )
                      }}
                      (天)</span
                    >
                    <!-- <el-input autocomplete="off" :disabled="true">{{Number(this.addSalaryByUser.shouldAttendanceDay-this.addSalaryByUser.travelDays-this.addSalaryByUser.leaveDays)}}</el-input> -->
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>固定工资 (元)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="basepay"
                    label="基本工资："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.basepay"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="postwage"
                    label="岗位工资："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.postwage"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="meritpay"
                    label="绩效工资："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.meritpay"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="combinedbasic"
                    label="固定合计："
                    :label-width="formLabelWidth_Salary"
                  >
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.basepay) +
                        Number(this.addSalaryByUser.postwage) +
                        Number(this.addSalaryByUser.meritpay)
                      }}</span
                    >
                    <!-- <el-input v-model="addSalaryByUser.combinedbasic" autocomplete="off" :disabled="true"></el-input> -->
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>福利待遇 (元)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="senioritypay"
                    label="工龄工资："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.senioritypay"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="mealallowance"
                    label="餐费补助："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.mealallowance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="trafficallowance"
                    label="交通补助："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.trafficallowance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="commission"
                    label="业务提成："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.commission"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="travelallowance"
                    label="出差补助："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.travelallowance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="attendancebonus"
                    label="全勤奖："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.attendancebonus"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="overtime"
                    label="加班费："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.overtime"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="communicatesubsidy"
                    label="通信补助："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.communicatesubsidy"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="othersupport"
                    label="其他补助："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.othersupport"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="totalwelfarebenefits"
                    label="福利合计："
                    :label-width="formLabelWidth_Salary"
                  >
                    <!-- <el-input v-model="addSalaryByUser.totalwelfarebenefits" autocomplete="off" :disabled="true"></el-input> -->
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.senioritypay) +
                        Number(this.addSalaryByUser.mealallowance) +
                        Number(this.addSalaryByUser.trafficallowance) +
                        Number(this.addSalaryByUser.commission) +
                        Number(this.addSalaryByUser.travelallowance) +
                        Number(this.addSalaryByUser.attendancebonus) +
                        Number(this.addSalaryByUser.overtime) +
                        Number(this.addSalaryByUser.communicatesubsidy) +
                        Number(this.addSalaryByUser.othersupport)
                      }}</span
                    >
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>扣减合计 (元)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="basicoldagepension"
                    label="基本养老："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.basicoldagepension"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="basicmedicalcare"
                    label="基本医疗："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.basicmedicalcare"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="unemploymentinsurance"
                    label="失业保险："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.unemploymentinsurance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="housingprovidentfund"
                    label="公积金："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.housingprovidentfund"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="individualincometax"
                    label="所得税："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.individualincometax"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="party"
                    label="党费："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.party"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="workInjury"
                    label="工伤："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.workInjury"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="lately"
                    label="迟到："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.lately"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="leaveearly"
                    label="早退："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.leaveearly"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="absenteeism"
                    label="旷工："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.absenteeism"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="otherdeductions"
                    label="其他扣款："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.otherdeductions"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="deductionscombined"
                    label="扣减合计："
                    :label-width="formLabelWidth_Salary"
                  >
                    <!-- <el-input v-model="addSalaryByUser.deductionscombined" autocomplete="off" :disabled="true"></el-input> -->
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.basicoldagepension) +
                        Number(this.addSalaryByUser.basicmedicalcare) +
                        Number(this.addSalaryByUser.unemploymentinsurance) +
                        Number(this.addSalaryByUser.housingprovidentfund) +
                        Number(this.addSalaryByUser.individualincometax) +
                        Number(this.addSalaryByUser.lately) +
                        Number(this.addSalaryByUser.leaveearly) +
                        Number(this.addSalaryByUser.absenteeism) +
                        Number(this.addSalaryByUser.otherdeductions) +
                        Number(this.addSalaryByUser.party) +
                        Number(this.addSalaryByUser.workInjury)
                      }}</span
                    >
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>企业保险 (元)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="providentFund"
                    label="企业公积金："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.providentFund"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="pension"
                    label="企业养老："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.pension"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="medical"
                    label="企业医疗："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.medical"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="unemployment"
                    label="企业失业："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.unemployment"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="businessInjury"
                    label="企业工伤："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.businessInjury"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="otherFee"
                    label="企业其他费用："
                    :label-width="formLabelWidth_Salary"
                  >
                    <el-input
                      v-model="addSalaryByUser.otherFee"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="totalFees"
                    label="企业费用合计："
                    :label-width="formLabelWidth_Salary"
                  >
                    <!-- <el-input v-model="addSalaryByUser.totalFees" autocomplete="off" :disabled="true"></el-input> -->
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.providentFund) +
                        Number(this.addSalaryByUser.pension) +
                        Number(this.addSalaryByUser.medical) +
                        Number(this.addSalaryByUser.unemployment) +
                        Number(this.addSalaryByUser.businessInjury) +
                        Number(this.addSalaryByUser.otherFee)
                      }}
                    </span>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin-top: 16px; font-weight: 550">
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="shouldsalary"
                    label="应发工资："
                    :label-width="formLabelWidth_Salary"
                  >
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.basepay) +
                        Number(this.addSalaryByUser.postwage) +
                        Number(this.addSalaryByUser.meritpay) +
                        (Number(this.addSalaryByUser.senioritypay) +
                          Number(this.addSalaryByUser.mealallowance) +
                          Number(this.addSalaryByUser.trafficallowance) +
                          Number(this.addSalaryByUser.commission) +
                          Number(this.addSalaryByUser.travelallowance) +
                          Number(this.addSalaryByUser.attendancebonus) +
                          Number(this.addSalaryByUser.overtime) +
                          Number(this.addSalaryByUser.communicatesubsidy) +
                          Number(this.addSalaryByUser.othersupport))
                      }}</span
                    >
                    <!-- <el-input v-model="addSalaryByUser.shouldsalary" autocomplete="off" :disabled="true"></el-input> -->
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="netpayroll"
                    label="实发工资："
                    :label-width="formLabelWidth_Salary"
                  >
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.basepay) +
                        Number(this.addSalaryByUser.postwage) +
                        Number(this.addSalaryByUser.meritpay) +
                        (Number(this.addSalaryByUser.senioritypay) +
                          Number(this.addSalaryByUser.mealallowance) +
                          Number(this.addSalaryByUser.trafficallowance) +
                          Number(this.addSalaryByUser.commission) +
                          Number(this.addSalaryByUser.travelallowance) +
                          Number(this.addSalaryByUser.attendancebonus) +
                          Number(this.addSalaryByUser.overtime) +
                          Number(this.addSalaryByUser.communicatesubsidy) +
                          Number(this.addSalaryByUser.othersupport)) -
                        (Number(this.addSalaryByUser.basicoldagepension) +
                          Number(this.addSalaryByUser.basicmedicalcare) +
                          Number(this.addSalaryByUser.unemploymentinsurance) +
                          Number(this.addSalaryByUser.housingprovidentfund) +
                          Number(this.addSalaryByUser.individualincometax) +
                          Number(this.addSalaryByUser.lately) +
                          Number(this.addSalaryByUser.leaveearly) +
                          Number(this.addSalaryByUser.absenteeism) +
                          Number(this.addSalaryByUser.otherdeductions) +
                          Number(this.addSalaryByUser.party) +
                          Number(this.addSalaryByUser.workInjury))
                      }}</span
                    >
                    <!-- <el-input v-model="addSalaryByUser.netpayroll" autocomplete="off" :disabled="true"></el-input> -->
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <div slot="footer" class="dialog-footer">
              <el-button size="small" @click="addSalaryByUserDialog = false"
                >取 消</el-button
              >
              <el-button
                size="small"
                type="primary"
                @click="addSalarys"
                v-if="!addEdit"
                >确 定</el-button
              >
              <el-button
                size="small"
                type="primary"
                @click="editSalarys"
                v-if="addEdit"
                >确 定</el-button
              >
            </div>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="公积金">
          <!-- 公积金按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="accumulationFundDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              size="small"
              icon="el-icon-delete"
              type="danger"
              @click="delaccumulationFund"
              :disabled="userId.length < 1"
              >删除
            </el-button>
            <el-button size="small" icon="el-icon-circle-close"
              >取消选择
            </el-button>
            <el-date-picker
              style="margin-left: 10px"
              v-model="accumulationFundPickerValue"
              format="yyyy-MM"
              value-format="yyyy-MM"
              type="month"
              size="small"
              @change="accumulationFundPicker"
              :clearable="false"
            >
            </el-date-picker>
          </div>
          <!-- 公积金数据表格 -->
          <el-table
            :data="accumulationFundTable"
            height="calc(100% - 80px)"
            size="small"
            ref="accumulationTog"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="accumulationLoading"
            row-key="id"
          >
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="userinformation.name"
              label="真实姓名"
              fixed="left"
              width="80"
            ></el-table-column>
            <el-table-column
              prop="paytime"
              label="缴费日期"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="accountstatus"
              label="账户状态"
              width="220"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("account_status", scope.row.accountstatus, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              prop="phone"
              label="手机号码"
              width="220"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="companyname.name"
              label="单位名称"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="depositbase"
              label="缴存基数"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="companydepositratio"
              label="单位缴存比例"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="companymonthlydeposit"
              label="单位月缴存额"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="personaldepositratio"
              label="个人缴存比例"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="personalmonthlydeposit"
              label="个人月缴存额"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="accountbalance"
              label="账户余额"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column fixed="right" label="操作" width="120">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="EditaccumulationFund(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delaccumulationFund(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <el-dialog
            title="公积金"
            :visible.sync="accumulationFundDialog"
            width="50%"
          >
            <el-form
              :model="accumulationFundList"
              size="small"
              ref="accumulationFundList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    label="缴费日期"
                    prop="paytime"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入缴费日期',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="accumulationFundList.paytime"
                      type="month"
                      format="yyyy-MM"
                      value-format="yyyy-MM"
                      placeholder="选择日期"
                      style="width: 100%"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="accountstatus"
                    label="账户状态"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入账户状态',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-select
                      v-model="accumulationFundList.accountstatus"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in accumulationFundsOptions"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="accountbalance"
                    label="账户余额"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入账户余额(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.accountbalance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="depositbase"
                    label="缴存基数"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入缴存基数',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.depositbase"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="companydepositratio"
                    label="单位缴存比例"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入单位缴存比例',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.companydepositratio"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="companymonthlydeposit"
                    label="单位月缴存额"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入单位月缴存额(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.companymonthlydeposit"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="personaldepositratio"
                    label="个人缴存比例"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入个人缴存比例',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.personaldepositratio"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="personalmonthlydeposit"
                    label="个人月缴存额"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入个人月缴存额(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.personalmonthlydeposit"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="accumulationFundDialog = false"
                >关闭</el-button
              >
              <el-button
                size="small"
                type="primary"
                @click="accumulationFundHealt"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="社保">
          <!-- 社保按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="socialSecurityDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="delSocialSecuritys"
              :disabled="checkSocialSecuritys.length <= 0"
              >删除
            </el-button>
            <el-button
              size="small"
              icon="el-icon-circle-close"
              @click="toggleSelections()"
              >取消选择
            </el-button>
            <el-date-picker
              style="margin-left: 10px"
              v-model="socialSecurityPickerValue"
              format="yyyy-MM"
              value-format="yyyy-MM"
              type="month"
              size="small"
              @change="asocialSecurityPicker"
              :clearable="false"
            >
            </el-date-picker>
          </div>
          <!-- 社保数据表格 -->
          <el-table
            :data="socialSecurityTable"
            height="calc(100% - 80px)"
            size="small"
            @selection-change="socialSecuritys"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            ref="socialTog"
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="socialSecurityloading"
            row-key="id"
          >
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="user.name"
              label="真实姓名"
              width="80"
              fixed="left"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="company.name"
              label="单位名称"
              width="220"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="paytime"
              label="缴费日期"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="pension"
              label="养老保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="medicalcare"
              label="医疗保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="unemployment"
              label="失业保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="birth"
              label="生育保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="workhurt"
              label="工伤保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column fixed="right" label="操作" width="120">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="redactSocialSecurity(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delSocialSecuritys(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 社保分页 -->
          <el-pagination
            @size-change="socialSecurityHandleSize"
            @current-change="socialSecurityHandleCurrent"
            :current-page.sync="socialSecurityPageNo"
            :page-size="socialSecurityPageSize"
            layout="total, prev, pager, next, jumper"
            :total="socialSecurityTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <!-- 社保新增 -->
          <el-dialog
            title="社保"
            :visible.sync="socialSecurityDialog"
            width="50%"
          >
            <el-form
              :model="socialSecurityList"
              size="small"
              ref="socialSecurityList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    prop="paytime"
                    size="small"
                    label="缴费日期"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入缴费日期',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="socialSecurityList.paytime"
                      format="yyyy-MM"
                      value-format="yyyy-MM"
                      type="month"
                      placeholder="选择月"
                      style="width: 100%"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="pension"
                    size="small"
                    label="养老保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入养老保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.pension"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="medicalcare"
                    size="small"
                    label="医疗保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入医疗保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.medicalcare"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="unemployment"
                    size="small"
                    label="失业保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入失业保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.unemployment"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="birth"
                    size="small"
                    label="生育保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入生育保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.birth"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="workhurt"
                    size="small"
                    label="工伤保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入工伤保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.workhurt"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="socialSecurityDialog = false"
                >关闭</el-button
              >
              <el-button
                size="small"
                type="primary"
                @click="socialSecurityHealt"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="合同">
          <!-- 合同数据表格 -->
          <el-table
            :data="contractTable"
            height="calc(100% - 80px)"
            size="small"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 10px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="contractLoading"
            row-key="id"
          >
            <el-table-column
              prop="user.name"
              label="人员名称"
              fixed="left"
              width="80"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column prop="idcard" label="人员身份证号" width="110" show-overflow-tooltip>
              <template slot-scope="scope">{{scope.row.idcard? scope.row.idcard.replace(/^(\d{4})\d+(\d{4})$/,"$1****$2"):""}}</template>
            </el-table-column>
            <el-table-column prop="phone" label="人员电话" width="110" show-overflow-tooltip>
              <template slot-scope="scope">{{scope.row.phone?scope.row.phone.replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3"):""}}</template>
            </el-table-column>
            <el-table-column
              prop="probationperiod"
              label="试用期时间"
              min-width="110"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                <span>{{ scope.row.probationperiod | formatDates(2) }}</span>
              </template>
            </el-table-column>
            <el-table-column
              prop="probationsalary"
              label="试用期薪资"
              min-width="110"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="begintime"
              label="开始时间"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                <span>{{ scope.row.begintime | formatDates(2) }}</span>
              </template>
            </el-table-column>
            <el-table-column
              prop="endtime"
              label="到期时间"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                <span>{{ scope.row.begintime | formatDates(2) }}</span>
              </template>
            </el-table-column>
            <el-table-column
              prop="userissure"
              label="人员是否确认"
              min-width="110"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("usersure", scope.row.userissure, '-') }}
              </template>
            </el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane label="工作经历">
          <!-- 工作经历按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="workenterpriseDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="delworkenterprise"
              :disabled="checkWorkenterprise.length <= 0"
              >删除
            </el-button>
            <el-button
              size="small"
              icon="el-icon-circle-close"
              @click="toggleSelections()"
              >取消选择
            </el-button>
          </div>
          <!-- 工作经历数据表格 -->
          <el-table
            :data="workenterpriseTable"
            height="calc(100% - 80px)"
            size="small"
            @selection-change="workenterprises"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            ref="workenTog"
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="workenterpriseloading"
            row-key="id"
          >
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column prop="postname" label="岗位名称"></el-table-column>
            <el-table-column
              prop="companyname"
              label="单位名称"
            ></el-table-column>
            <el-table-column prop="departement" label="部门"></el-table-column>
            <el-table-column
              prop="starttime"
              label="入职时间"
            ></el-table-column>
            <el-table-column prop="endtime" label="离职时间"></el-table-column>
            <el-table-column fixed="right" label="操作" width="120">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="redactworkenterprise(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delworkenterprise(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 工作经历分页 -->
          <el-pagination
            @size-change="workenterpriseHandleSize"
            @current-change="workenterpriseHandleCurrent"
            :current-page.sync="workenterprisePageNo"
            :page-size="workenterprisePageSize"
            layout="total, prev, pager, next, jumper"
            :total="workenterpriseTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <!-- 工作经历新增、编辑 -->
          <el-dialog
            title="工作经历"
            :visible.sync="workenterpriseDialog"
            width="50%"
          >
            <el-form
              :model="workenterpriseList"
              size="small"
              ref="workenterpriseList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    prop="postname"
                    size="small"
                    label="岗位"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入岗位',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-date-picker v-model="workenterpriseList.postname" format="yyyy-MM" value-format="yyyy-MM" type="month"
                                                placeholder="选择月" style="width:100%"></el-date-picker> -->
                    <el-input
                      v-model="workenterpriseList.postname"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="companyname"
                    size="small"
                    label="公司名称"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入公司名称',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="workenterpriseList.companyname"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="starttime"
                    size="small"
                    label="起始时间"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请选择起始时间',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-input v-model="workenterpriseList.starttime" autocomplete="off"></el-input> -->
                    <el-date-picker
                      v-model="workenterpriseList.starttime"
                      format="yyyy-MM-dd"
                      value-format="yyyy-MM-dd"
                      style="width: 100%"
                      type="date"
                      placeholder="选择日期"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="endtime"
                    size="small"
                    label="结束时间"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请选择结束时间',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-input v-model="workenterpriseList.endtime" autocomplete="off"></el-input> -->
                    <el-date-picker
                      v-model="workenterpriseList.endtime"
                      format="yyyy-MM-dd"
                      value-format="yyyy-MM-dd"
                      style="width: 100%"
                      type="date"
                      placeholder="选择日期"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="departement"
                    size="small"
                    label="所在部门"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入所在部门',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="workenterpriseList.departement"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="worktype"
                    size="small"
                    label="工作性质"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请选择工作性质',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-input v-model="workenterpriseList.worktype" autocomplete="off"></el-input> -->
                    <el-select
                      v-model="workenterpriseList.worktype"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in natureWork"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="workexperience"
                    size="small"
                    label="工作经验"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入工作经验',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="workenterpriseList.workexperience"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="witness"
                    size="small"
                    label="证明人"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入证明人',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="workenterpriseList.witness"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="witnesscontact"
                    size="small"
                    label="证明人联系方式"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入证明人联系方式',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="workenterpriseList.witnesscontact"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="iscontract"
                    size="small"
                    label="是否解除劳动合同"
                    label-width="135px"
                    :rules="[
                      {
                        required: true,
                        message: '请选择是否解除劳动合同',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-input v-model="workenterpriseList.iscontract" autocomplete="off"></el-input> -->
                    <el-select
                      v-model="workenterpriseList.iscontract"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in terminateContract"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="workenterpriseDialog = false"
                >关闭</el-button
              >
              <el-button
                size="small"
                type="primary"
                @click="workenterpriseHealt"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="家庭状况">
          <!-- 家庭状况按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="familystatusDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="delfamilystatus"
              :disabled="checkFamilystatus.length <= 0"
              >删除
            </el-button>
            <el-button
              size="small"
              icon="el-icon-circle-close"
              @click="toggleSelections()"
              >取消选择
            </el-button>
          </div>
          <!-- 家庭状况数据表格 -->
          <el-table
            :data="familystatusTable"
            height="calc(100% - 80px)"
            size="small"
            @selection-change="familystatuss"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            ref="familyTog"
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="familystatusloading"
            row-key="id"
          >
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="name"
              label="姓名"
              align="center"
              fixed="left"
              width="80"
            ></el-table-column>
            <el-table-column
              prop="birthday"
              label="出生年月"
              width="150px"
            ></el-table-column>
            <el-table-column
              prop="relationship"
              label="与本人关系"
              width="100px"
            ></el-table-column>
            <el-table-column
              prop="workcompany"
              label="工作单位"
            ></el-table-column>
            <el-table-column
              prop="position"
              label="职位"
              width="180px"
            ></el-table-column>
            <el-table-column
              prop="isretire"
              label=" 是否退休"
              width="80px"
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("yes_no", scope.row.isretire, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              prop="education"
              label="学历"
              width="100px"
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("nature", scope.row.education, '-') }}
              </template></el-table-column>
            <el-table-column prop="phone" label="电话" width="110" show-overflow-tooltip>
					    <template slot-scope="scope">{{scope.row.phone?scope.row.phone.replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3"):""}}</template>
                    </el-table-column>
            <el-table-column fixed="right" label="操作" width="120">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="redactfamilystatus(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delfamilystatus(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 家庭状况分页 -->
          <el-pagination
            @size-change="familystatusHandleSize"
            @current-change="familystatusHandleCurrent"
            :current-page.sync="familystatusPageNo"
            :page-size="familystatusPageSize"
            layout="total, prev, pager, next, jumper"
            :total="familystatusTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <!-- 家庭状况新增、编辑 -->
          <el-dialog
            title="家庭状况"
            :visible.sync="familystatusDialog"
            width="50%"
          >
            <el-form
              :model="familystatusList"
              size="small"
              ref="familystatusList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    prop="name"
                    size="small"
                    label="姓名"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入姓名',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-date-picker v-model="workenterpriseList.postname" format="yyyy-MM" value-format="yyyy-MM" type="month"
                                                placeholder="选择月" style="width:100%"></el-date-picker> -->
                    <el-input
                      v-model="familystatusList.name"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="birthday"
                    size="small"
                    label="出生年月"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请选择出生年月',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- <el-input v-model="workenterpriseList.starttime" autocomplete="off"></el-input> -->
                    <el-date-picker
                      v-model="familystatusList.birthday"
                      format="yyyy-MM"
                      value-format="yyyy-MM"
                      style="width: 100%"
                      type="month"
                      placeholder="选择日期"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="relationship"
                    size="small"
                    label="与本人关系"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入与本人关系',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="familystatusList.relationship"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="workcompany"
                    size="small"
                    label="工作单位"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入工作单位',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="familystatusList.workcompany"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="position"
                    size="small"
                    label="职位"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入职位',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="familystatusList.position"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="isretire"
                    size="small"
                    label="是否退休"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请选择是否退休',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-select
                      v-model="familystatusList.isretire"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in terminateContract"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="education"
                    size="small"
                    label="学历"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请选择学历',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-select
                      v-model="familystatusList.education"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in status_education"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="phone"
                    size="small"
                    label="电话"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入电话',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="familystatusList.phone"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="familystatusDialog = false"
                >关闭</el-button
              >
              <el-button size="small" type="primary" @click="familystatusHealt"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="考勤记录">
          <div style="padding-bottom: 10px">
            <el-date-picker
              v-model="attendanceRecordValue"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              type="date"
              size="small"
              @change="attendanceRecordPicker"
              :clearable="false"
            ></el-date-picker>
          </div>
          <el-table
            :data="attendanceRecordTable"
            ref="attendanceRecord"
            height="calc(100% - 80px)"
            size="small"
            row-key="id"
            :cell-style="cellStyle"
            style="border: 1px solid #d6cfe2; min-height: 380px"
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            class="table"
            v-loading="attendanceRecordLoading"
          >
            <el-table-column
              prop="name"
              align="center"
              label="姓名"
              width="80"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="company.name"
              label="公司"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="animalheat"
              label="体温"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="time"
              label="打卡时间"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="checktype"
              label="打卡类型"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("checkin_type", scope.row.checktype, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              prop="isType"
              label="签到/签退"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("is_checkin", scope.row.isType, '-') }}
              </template>
            </el-table-column>
          </el-table>
          <!-- 考勤分页 -->
          <el-pagination
            @size-change="attendanceRecordSize"
            @current-change="attendanceRecordCurrent"
            :current-page.sync="attendanceRecordPageNo"
            :page-size="attendanceRecordPageSize"
            layout="total, prev, pager, next, jumper"
            :total="attendanceRecordTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>
<script>
import tableStyles from "../../../../utils/mixins.js";
export default {
  mixins: [tableStyles],
  data() {
    var bankAccountValid = (rule, value, callback) => {
      const strBin =
        "10,18,30,35,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,62,65,68,69,84,87,88,94,95,98,99";
      if (!value) {
        return callback(new Error("收款账户不能为空"));
      } else if (!Number.isInteger(+value)) {
        callback(new Error("银行卡号必须全为数字"));
      } else if (value.trim().length < 12 || value.trim().length > 19) {
        callback(new Error("银行卡号长度必须在12到19之间"));
      } else if (strBin.indexOf(value.substring(0, 2)) === -1) {
        callback(new Error("银行卡号开头6位不符合规范"));
      } else {
        callback();
      }
    };
    return {
      companyId: "", //公司id
      userId: "", //用户选中id
      formLabelWidth: "100px",
      //搜索对象
      offices: [], //归属部门
      findPost: [], //岗位
      personalInformationSearch: {
        name: "",
        idCard: "",
        phone: "",
        degree: "",
        post: "",
        workingyears: "",
        major: "",
        office: "",
      },
      userInforAllTable: [], //用户管理数组,分页,总条数
      userInforAllPageNo: 1,
      userInforAllPageSize: 10,
      userInforAllTotal: 0,
      userInforAllLoading: false,
      userInforAllDialog: false,
      checkPersonInfo: [], //顶部选中数组
      //详细信息
      //基本信息
      essential:{
        name:'',
        sex:'',
        company:{
        name:''
        },
        office:{
        name:''
        },
        nativeplace:'',
        nation:'',
        higesteducation:'',
        higesteducationmajor:'',
        phone:'',
        idCard:'',
        post:{
          name:''
        },
        datebirth:'',
        email:'',
        politicaloutlook:'',
        interest:'',
        higesteducationschool:'',
        photo:'',
        drivinglicense:'',
        bankaccount:'',
        staffstatus:'',
        workingyears:'',
        emergcypeople:'',
        emergcyphone:'',
        banknumber:'',
        bankofdeposit:'',
        currentaddress:'',
      },
      //详情-工作经验数组
      WorkExperience: [],
      //详情-转正信息
      FindRuzhi: [],
      //详情-调岗记录
      JobTransfer: [],
      //详情-家庭情况
      FamilySituation: [],
      //详情-教育经历
      Educational: [],
      insertUserpersonal: false, //详情页面
      formLabelWidth_People: "110px", //详情表单宽度
      //最高学历
      status_education: [
        {
          value: "1",
          label: "中专",
        },
        {
          value: "2",
          label: "大专",
        },
        {
          value: "3",
          label: "高中",
        },
        {
          value: "4",
          label: "本科",
        },
        {
          value: "5",
          label: "硕士",
        },
        {
          value: "6",
          label: "博士",
        },
         {
          value: "7",
          label: "初中",
        },
      ],
      attachedListNum: "0", //附表选项卡绑定的值

      //资质证书
      qualiFicationTable: [],
      qualiFicationLoading: false,
      qualiFicationPageNo: 1, //资质证书分页，总条数
      qualiFicationPageSize: 10,
      qualiFicationTotal: 0,
      checkqualiFication: [], //选中数组
      qualiFicationDialog: false, //新增编辑
      qualiFicationList: {
        id: "",
        describe: "",
        certificateName: "", // 资质证书附件名称
        certificate: "", // 资质证书附件
        fileList: [],
      },

      //体检报告
      findMedicalTable: [],
      findMedicalLoading: false,
      findMedicalPageNo: 1, //体检报告分页，总条数
      findMedicalPageSize: 10,
      findMedicalTotal: 0,
      checkfindMedical: [], //选中数组
      findMedicalDialog: false,
      findMedicalList: {
        id: "",
        medicalname: "", // 体检名称
        medicaldate: "", // 体检日期
        summary: "", // 汇总分析
        medicalarea: "", // 体检医院
        detailedaddress: "", // 详细地址
        level: "", // 医院等级
        medicaltype: "", // 体检类型
      },
      options: [
        {
          value: "0",
          label: "入职体检",
        },
        {
          value: "1",
          label: "常规体检",
        },
      ],
      hospital: [
        {
          value: "0",
          label: "三级特等",
        },
        {
          value: "1",
          label: "三级甲等",
        },
        {
          value: "2",
          label: "三级乙等",
        },
        {
          value: "3",
          label: "三级丙等",
        },
        {
          value: "4",
          label: "二级甲等",
        },
        {
          value: "5",
          label: "二级乙等",
        },
        {
          value: "6",
          label: "二级丙等",
        },
        {
          value: "7",
          label: "一级甲等",
        },
        {
          value: "8",
          label: "一级乙等",
        },
        {
          value: "9",
          label: "一级丙等",
        },
      ],

      //工伤记录
      findUserInjuryTable: [],
      findUserInjuryLoading: false,
      findUserInjuryPageNo: 1, //工伤记录分页，总条数
      findUserInjuryPageSize: 10,
      findUserInjuryTotal: 0,
      checkfindUserInjury: [], //选中数组
      findUserInjuryDialog: false,
      findUserInjuryList: {
        id: "",
        time: "", // 发生时间
        commercialocation: "", // 工伤发生地点
        businesslevel: "", // 工伤级别
        medicaldiagnosis: "", // 医学诊断附件
        medicaldiagnosisresult: "", // 医学诊断结果
        fileList: [],
      },
      // 工伤等级
      options_bus: [
        {
          value: "1",
          label: "一级",
        },
        {
          value: "2",
          label: "二级",
        },
        {
          value: "3",
          label: "三级",
        },
        {
          value: "4",
          label: "四级",
        },
        {
          value: "5",
          label: "五级",
        },
        {
          value: "6",
          label: "六级",
        },
        {
          value: "7",
          label: "七级",
        },
        {
          value: "8",
          label: "八级",
        },
        {
          value: "9",
          label: "九级",
        },
        {
          value: "10",
          label: "十级",
        },
      ],

      //工资表
      formLabelWidth_Salary: "110px",
      payrollPickerValue: "", //工资日期
      payrollTable: [], //工资数据数组
      payrollloading: false,
      payrollPageNo: 1, //工资分页，总条数
      payrollPageSize: 10,
      payrollTotal: 0,
      payrollDialog: false,
      addEdit: false,
      userIdList: [], //新增工资姓名下拉选
      addSalaryByUserDialog: false,
      addSalaryByUser: {
        id: "",
        salyear: "", // 工资年月
        username: "", // 姓名
        companyname: "", // 公司名称
        idcard: "", // 身份证号
        idnumber: "", // 部门
        job: "", // 岗位
        phone: "", // 手机号
        user: "", // 用户名
        bankofdeposit: "", // 开户银行
        bankaccount: "", // 银行账号
        banknumber: "", // 行号
        shouldattendanceday: "", // 应出勤天数
        traveldays: "", // 出差天数
        leavedays: "", // 请假天数
        realityattendanceday: "", // 实际出勤天数
        basepay: "", // 基本工资
        postwage: "", // 岗位工资
        meritpay: "", // 绩效工资
        combinedbasic: "", // 基本合计
        senioritypay: "", // 工龄工资
        mealallowance: "", // 餐费补助
        trafficallowance: "", // 交通补助
        commission: "", // 业务提成
        travelallowance: "", // 出差补助
        attendancebonus: "", // 全勤奖
        overtime: "", // 加班费
        communicatesubsidy: "", // 通信补助
        othersupport: "", // 其他补助
        totalwelfarebenefits: "", // 福利待遇合计
        shouldsalary: "", // 应发工资
        basicoldagepension: "", // 基本养老
        basicmedicalcare: "", // 基本医疗
        unemploymentinsurance: "", // 失业保险
        housingprovidentfund: "", // 住房公积金
        individualincometax: "", // 个人所得税
        lately: "", // 迟到扣款
        leaveearly: "", // 早退扣款
        absenteeism: "", // 旷工扣款
        party: "", //党费
        workInjury: "", //工伤扣款
        otherdeductions: "", // 其他扣款
        deductionscombined: "", // 扣款合计
        netpayroll: "", // 实发工资
        providentFund: "", //企业公积金
        pension: "", //企业养老
        medical: "", //企业医疗
        unemployment: "", //企业失业
        businessInjury: "", //企业工伤
        otherFee: "", //企业其他费用
        totalFees: "", //企业费用合计
        createBy: "", //创建者id
        updateBy: "", //更新者id
      },
      rule: {
        salyear: { required: true, message: "请选择日期", trigger: "blur" },
        username: { required: true, message: "请选择姓名" },
        // department:{required: true, message: '请选择部门', },
        // job:{required: true, message: '请输入岗位', trigger: 'blur'},
        idnumber: [
          { required: true, message: "请输入身份证号", trigger: "blur" },
          { min: 15, max: 18, message: "请输入正确的身份证", trigger: "blur" },
          {
            required: true,
            pattern:
              /^[1-9][0-9]{5}(18|19|20)[0-9]{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)[0-9]{3}([0-9]|(X|x))/,
            message: "请输入正确的身份证",
            trigger: "blur",
          },
        ],
        phone: [
          { required: true, message: "请输入电话", trigger: "blur" },
          { min: 11, max: 11, message: "请输入正确的电话", trigger: "blur" },
          {
            required: true,
            pattern: /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/,
            message: "请输入正确的电话",
            trigger: "blur",
          },
        ],
        bankcard: {
          required: true,
          trigger: "blur",
          validator: bankAccountValid,
        },
        openingbank: {
          required: true,
          message: "请输入银行开户行",
          trigger: "blur",
        },
        shouldattendanceday: {
          required: true,
          message: "请输入应出勤",
          trigger: "blur",
        },
        traveldays: { required: true, message: "请输入出差", trigger: "blur" },
        leavedays: { required: true, message: "请输入请假", trigger: "blur" },
        // realityAttendanceDay:[
        // 	{required: true, message: '请输入实际出勤', trigger: 'blur'},
        // 	{validator: realityAttendanceDays, trigger: 'blur' }
        // ],
        basepay: { required: true, message: "请输入基本工资", trigger: "blur" },
        postwage: {
          required: true,
          message: "请输入岗位工资",
          trigger: "blur",
        },
        meritpay: {
          required: true,
          message: "请输入绩效工资",
          trigger: "blur",
        },
      },
      checkpayroll: [], //家庭状况（修改、批量删除）

      //公积金
      accumulationLoading: "",
      accumulationFundTable: [], //公积金数据数组
      accumulationFundPickerValue: "", //公积金日期
      accumulationFundDialog: false,
      accumulationFundList: {
        id: "",
        paytime: "", // 缴费日期
        accountstatus: "", // 账户状态
        depositbase: "", // 缴存基数
        companymonthlydeposit: "", // 单位月缴存额
        companydepositratio: "", // 单位缴存比例
        personaldepositratio: "", // 个人缴存比例
        personalmonthlydeposit: "", // 个人月缴存额
        accountbalance: "", // // 账户余额
      },
      //账户状态
      accumulationFundsOptions: [
        {
          value: "0",
          label: "正常状态",
        },
        {
          value: "1",
          label: "封存状态",
        },
        {
          value: "2",
          label: "冻结状态",
        },
      ],

      //社保
      socialSecurityTable: [], //社保数据数组
      socialSecurityloading: false,
      socialSecurityPageNo: 1, //公积金分页，总条数
      socialSecurityPageSize: 10,
      socialSecurityTotal: 0,
      socialSecurityPickerValue: "", //社保日期
      socialSecurityDialog: false,
      socialSecurityList: {
        id: "",
        paytime: "",
        pension: "",
        medicalcare: "",
        unemployment: "",
        birth: "",
        workhurt: "",
      },
      checkSocialSecuritys: [], //选中社保（修改、批量删除）

      //合同
      contractTable: [], //合同数据数组
      contractLoading: false,

      //工作经历
      workenterpriseTable: [], //社保数据数组
      workenterpriseloading: false,
      workenterprisePageNo: 1, //公积金分页，总条数
      workenterprisePageSize: 10,
      workenterpriseTotal: 0,
      workenterpriseDialog: false,
      workenterpriseList: {
        id: "",
        postname: "", // 岗位
        companyname: "", // 公司名称
        starttime: "", // 起始时间
        endtime: "", // 结束时间
        departement: "", // 所在部门
        worktype: "", // 工作性质
        workexperience: "", // 工作经验
        witness: "", // 证明人
        witnesscontact: "", // 证明人联系方式
        iscontract: "", // 是否解除联系方式
      },
      checkWorkenterprise: [], //工作经历（修改、批量删除）
      natureWork: [
        {
          value: "0",
          label: "全职",
        },
        {
          value: "1",
          label: "实习",
        },
        {
          value: "2",
          label: "兼职",
        },
      ],
      terminateContract: [
        {
          value: "0",
          label: "是",
        },
        {
          value: "1",
          label: "否",
        },
      ],

      //家庭状况
      familystatusTable: [], //社保数据数组
      familystatusloading: false,
      familystatusPageNo: 1, //公积金分页，总条数
      familystatusPageSize: 10,
      familystatusTotal: 0,
      familystatusDialog: false,
      familystatusList: {
        id: "",
        name: "", // 姓名
        birthday: "", // 出生年月
        relationship: "", // 与本人关系
        workcompany: "", // 工作单位
        position: "", // 职位
        isretire: "", // 是否退休
        education: "", // 学习
        phone: "", // 电话
      },
      checkFamilystatus: [], //家庭状况（修改、批量删除）

      //考勤记录
      attendanceRecordTable: [],
      attendanceRecordLoading: false,
      attendanceRecordValue: "", //考勤日期
      attendanceRecordPageNo: 1,
      attendanceRecordPageSize: 10,
      attendanceRecordTotal: 0,
      attendanceRecordstatus: [], //考勤记录（修改、批量删除）

      dialog: false,
    };
  },
  mounted() {
    this.getuserInforAll();
    this.getCurrentDate();
    this.findPosts(); //岗位
    this.getOffices(); //查询部门
  },
  updated() {	
			this.$nextTick(() => {
				this.$refs['payrollTog'].doLayout();
			})  
  },
  //接收ID参数
  created() {
    this.companyId = this.$route.query.id;
  },
  methods: {
    setDialog() {
      this.dialog = !this.dialog;
    },
    //当前日期
    getCurrentDate() {
      var date = new Date();
      var y = date.getFullYear();
      var m =
        date.getMonth() + 1 < 10
          ? "0" + (date.getMonth() + 1)
          : date.getMonth() + 1;
      var d = date.getDate();
      this.payrollPickerValue = y + "-" + m; //工资表日期；
      this.accumulationFundPickerValue = y + "-" + m; //公积金日期；
      this.socialSecurityPickerValue = y + "-" + m; //社保日期；
      this.attendanceRecordValue = y + "-" + m + "-" + d; //考勤日期；
    },
    // ---------------------------------------------
    //部门查询
    getOffices() {
      this.$http({
        url: "/sys/person/findOffice",
        method: "get",
        params: {
          companyId: this.companyId,
        },
      }).then(({ data }) => {
        // console.log("部门",data);
        if (data) {
          this.offices = data.children;
        }
      });
    },
    //岗位查询
    findPosts() {
      this.findPost = [];
      this.$http({
        url: "/sys/web/userinfo/findPost",
        method: "get",
        params: {},
      }).then(({ data }) => {
        // console.log("岗位",data);
        if (data) {
          this.findPost = data.post;
        }
      });
    },
    //搜索重置
    resetPersonSearch() {
      (this.personalInformationSearch.name = ""),
        (this.personalInformationSearch.idCard = ""),
        (this.personalInformationSearch.phone = ""),
        (this.personalInformationSearch.degree = ""),
        (this.personalInformationSearch.post = ""),
        (this.personalInformationSearch.workingyears = ""),
        (this.personalInformationSearch.major = ""),
        (this.personalInformationSearch.office = ""),
        this.getuserInforAll();
    },
    // 顶部选项卡
    selectuserInforAll(val) {
      this.checkPersonInfo = [];
      this.checkPersonInfo = val;
      this.userId = "";
      //顶部选型卡发生变化清空附表数据
      this.qualiFicationTable = [];
      this.findMedicalTable = [];
      this.findUserInjuryTable = [];
      this.payrollTable = [];
      this.accumulationFundTable = [];
      this.socialSecurityTable = [];
      this.contractTable = [];
      this.workenterpriseTable = [];
      this.familystatusTable = [];
      this.attendanceRecordTable = [];

      if (this.checkPersonInfo.length == 1) {
        this.userId = val[val.length - 1].id;
        this.addSalaryByUser.username = val[val.length - 1].name;
        this.addSalaryByUser.phone = val[val.length - 1].phone;
        this.addSalaryByUser.idcard = val[val.length - 1].idCard;
        this.addSalaryByUser.job = val[val.length - 1].post;
        this.addSalaryByUser.idnumber = val[val.length - 1].office;
        this.addSalaryByUser.bankofdeposit = val[val.length - 1].bankofdeposit;
        this.addSalaryByUser.bankaccount = val[val.length - 1].bankaccount;
        this.addSalaryByUser.banknumber = val[val.length - 1].banknumber;
      }
      this.handleClick();
    },
    //用户管理分页
    userInforAllHandleSize(val) {
      this.userInforAllPageNo = 1;
      this.userInforAllPageSize = val;
      this.getuserInforAll();
    },
    userInforAllCurrent(val) {
      this.userInforAllPageNo = val;
      this.getuserInforAll();
    },
    // 用户管理 查询所有人员
    getuserInforAll() {
      this.userInforAllLoading = true;
      this.$http({
        url: "/sys/person/findPerson",
        method: "get",
        params: {
          pageNo: this.userInforAllPageNo,
          pageSize: this.userInforAllPageSize,
          companyId: this.companyId,
          ...this.personalInformationSearch,
        },
      }).then(({ data }) => {
        // console.log("用户管理所有人员",data);
        if (data) {
          this.userInforAllTable = data.userList;
          if (this.userInforAllTable.length == 0) {
            this.userInforAllTotal = 0;
          } else {
            this.userInforAllTotal = this.userInforAllTable.length;
          }
          this.userInforAllLoading = false;
        }
      });
    },
    //用户管理 性别
    formatterSex(row, column) {
      if (row.sex == 0 || row.sex == "男") {
        return "男";
      } else if (row.sex == 1 || row.sex == "女") {
        return "女";
      }
    },
    //用户管理取消选择
    toggleSelection(rows) {
      if (rows) {
        rows.forEach((row) => {
          this.$refs.userInforAll.toggleRowSelection(row);
        });
      } else {
        this.$refs.userInforAll.clearSelection();
      }
    },
    //用户管理个人详情页面查看
    listdetails(row) {
      console.log("1111", row);
      this.essential = row;
      if (row.sex == "") {
        this.essential.sex = "";
      } else if (row.sex == 0) {
        this.essential.sex = "男";
      } else if (row.sex == 1) {
        this.essential.sex = "女";
      }
      if (this.essential.higesteducation == 1) {
        this.essential.higesteducation = "中专";
      } else if (this.essential.higesteducation == 2) {
        this.essential.higesteducation = "大专";
      } else if (this.essential.higesteducation == 3) {
        this.essential.higesteducation = "高中";
      } else if (this.essential.higesteducation == 4) {
        this.essential.higesteducation = "本科";
      } else if (this.essential.higesteducation == 5) {
        this.essential.higesteducation = "硕士";
      } else if (this.essential.higesteducation == 6) {
        this.essential.higesteducation = "博士";
      }else if (this.essential.higesteducation == 7) {
        this.essential.higesteducation = "初中";
      }
      if (this.essential.drivinglicense == "") {
        this.essential.drivinglicense = "";
      } else if (this.essential.drivinglicense == 0) {
        this.essential.drivinglicense = "A1";
      } else if (this.essential.drivinglicense == 1) {
        this.essential.drivinglicense = "A2";
      } else if (this.essential.drivinglicense == 2) {
        this.essential.drivinglicense = "A3";
      } else if (this.essential.drivinglicense == 3) {
        this.essential.drivinglicense = "B1";
      } else if (this.essential.drivinglicense == 4) {
        this.essential.drivinglicense = "B2";
      } else if (this.essential.drivinglicense == 5) {
        this.essential.drivinglicense = "C1";
      } else if (this.essential.drivinglicense == 6) {
        this.essential.drivinglicense = "C2";
      } else if (this.essential.drivinglicense == 7) {
        this.essential.drivinglicense = "C3";
      } else if (this.essential.drivinglicense == 8) {
        this.essential.drivinglicense = "C4";
      } else if (this.essential.drivinglicense == 9) {
        this.essential.drivinglicense = "C5";
      } else if (this.essential.drivinglicense == 10) {
        this.essential.drivinglicense = "D";
      } else if (this.essential.drivinglicense == 11) {
        this.essential.drivinglicense = "E";
      } else if (this.essential.drivinglicense == 12) {
        this.essential.drivinglicense = "F";
      } else if (this.essential.drivinglicense == 13) {
        this.essential.drivinglicense = "M";
      } else if (this.essential.drivinglicense == 14) {
        this.essential.drivinglicense = "N";
      } else if (this.essential.drivinglicense == 15) {
        this.essential.drivinglicense = "P";
      }
      if (this.essential.staffstatus == "") {
        this.essential.staffstatus = "";
      } else if (this.essential.staffstatus == 0) {
        this.essential.staffstatus = "全职";
      } else if (this.essential.staffstatus == 1) {
        this.essential.staffstatus = "兼职";
      } else if (this.essential.staffstatus == 2) {
        this.essential.staffstatus = "实习";
      } else if (this.essential.staffstatus == 3) {
        this.essential.staffstatus = "试用";
      } else if (this.essential.staffstatus == 4) {
        this.essential.staffstatus = "小时工";
      } else if (this.essential.staffstatus == 5) {
        this.essential.staffstatus = "钟点工";
      }
      if (this.essential.politicaloutlook == 0) {
        this.essential.politicaloutlook = "中共党员";
      } else if (this.essential.politicaloutlook == 1) {
        this.essential.politicaloutlook = "中共预备党员";
      } else if (this.essential.politicaloutlook == 2) {
        this.essential.politicaloutlook = "共青团员";
      } else if (this.essential.politicaloutlook == 3) {
        this.essential.politicaloutlook = "民革党员";
      } else if (this.essential.politicaloutlook == 4) {
        this.essential.politicaloutlook = "民盟盟员";
      } else if (this.essential.politicaloutlook == 5) {
        this.essential.politicaloutlook = "民建会员";
      } else if (this.essential.politicaloutlook == 6) {
        this.essential.politicaloutlook = "民进会员";
      } else if (this.essential.politicaloutlook == 7) {
        this.essential.politicaloutlook = "农工党党员";
      } else if (this.essential.politicaloutlook == 8) {
        this.essential.politicaloutlook = "致公党党员";
      } else if (this.essential.politicaloutlook == 9) {
        this.essential.politicaloutlook = "九三学社社员";
      } else if (this.essential.politicaloutlook == 10) {
        this.essential.politicaloutlook = "台盟盟员";
      } else if (this.essential.politicaloutlook == 11) {
        this.essential.politicaloutlook = "无党派人士";
      } else if (this.essential.politicaloutlook == 12) {
        this.essential.politicaloutlook = "群众";
      }
      // this.essential.office = row.office.name;
      // this.essential.company = row.company.name;
      // this.essential.post = row.post.name;
      this.getfindUser(row.id);
      this.getfindContract(row.id);
      this.insertUserpersonal = true;
      // this.userId_peo = row.id;
      // console.log("123", this.userId_peo)
      // this.inFormation();
      // this.employment();
    },

    //详情工作经历
    getfindUser(id) {
      this.$http({
        url: "/sys/web/userinfo/findUser",
        method: "get",
        params: {
          userId: id,
        },
      }).then(({ data }) => {
        // console.log("详情查询",data);
        if (data) {
          this.WorkExperience = data.user.userWorkEnterpriseList;
          // console.log("工作经历",this.WorkExperience);
          this.FamilySituation = data.user.familySituationList;
          // console.log("家庭情况",this.FamilySituation);
          this.Educational = data.user.educationExperienceList;
          // console.log("教育经历",this.Educational);
        }
      });
    },
    //详情转正信息
    getfindContract(id) {
      this.$http({
        url: "/sys/web/userinfo/findContract",
        method: "get",
        params: {
          userId: id,
        },
      }).then(({ data }) => {
        // console.log("详情查询 - 转正信息 - 调岗记录",data);
        if (data) {
          this.FindRuzhi = data.contractUsers;
          // console.log("转正信息",this.FindRuzhi);
          this.JobTransfer = data.transferlist;
          // console.log("调岗记录",this.JobTransfer);
        }
      });
    },

    //附表tab选项卡
    handleClick() {
      if (this.checkPersonInfo.length == 1) {
        switch (this.attachedListNum) {
          case "0":
            this.getfindcertification();
            break;
          case "1":
            this.getfindMedical();
            break;
          case "2":
            this.getfindUserInjury();
            break;
          case "3":
            this.getfindsalary();
            break;
          case "4":
            this.getAccumulationFund();
            break;
          case "5":
            this.getSocialSecuCompany();
            break;
          case "6":
            this.selectUserContract();
            break;
          case "7":
            this.getWorkenterprise();
            break;
          case "8":
            this.getFamilystatus();
            break;
          case "9":
            this.getAttendanceRecord();
            break;
        }
      } else if (this.checkPersonInfo.length > 1) {
        this.$message.warning("若查看附表，请选择一条信息");
      }
    },
    // -------
    //下表取消选择
    toggleSelections(rows) {
      switch (this.attachedListNum) {
        case "0":
          if (rows) {
            rows.forEach((row) => {
              this.$refs.qualiFicationTog.toggleRowSelection(row);
            });
          } else {
            this.$refs.qualiFicationTog.clearSelection();
          }
          break;
        case "1":
          if (rows) {
            rows.forEach((row) => {
              this.$refs.findMedicalTog.toggleRowSelection(row);
            });
          } else {
            this.$refs.findMedicalTog.clearSelection();
          }
          break;
        case "2":
          if (rows) {
            rows.forEach((row) => {
              this.$refs.findUserInjuryTog.toggleRowSelection(row);
            });
          } else {
            this.$refs.findUserInjuryTog.clearSelection();
          }
          break;
        case "3":
          if (rows) {
            rows.forEach((row) => {
              this.$refs.payrollTog.toggleRowSelection(row);
            });
          } else {
            this.$refs.payrollTog.clearSelection();
          }
          break;
        case "4":
          if (rows) {
            rows.forEach((row) => {
              this.$refs.accumulationTog.toggleRowSelection(row);
            });
          } else {
            this.$refs.accumulationTog.clearSelection();
          }
          break;
        case "5":
          if (rows) {
            rows.forEach((row) => {
              this.$refs.socialTog.toggleRowSelection(row);
            });
          } else {
            this.$refs.socialTog.clearSelection();
          }
          break;
        case "7":
          if (rows) {
            rows.forEach((row) => {
              this.$refs.workenTog.toggleRowSelection(row);
            });
          } else {
            this.$refs.workenTog.clearSelection();
          }
          break;
        case "8":
          if (rows) {
            rows.forEach((row) => {
              this.$refs.familyTog.toggleRowSelection(row);
            });
          } else {
            this.$refs.familyTog.clearSelection();
          }
          break;
      }
    },

    // ---------------------------------------------
    //资质证书分页
    qualiFicationHandleSize(val) {
      this.qualiFicationPageSize = val;
      this.qualiFicationPageNo = 1;
      this.getfindcertification();
    },
    qualiFicationHandleCurrent(val) {
      this.qualiFicationPageNo = val;
      this.getfindcertification();
    },
    // 资质证书 查询
    getfindcertification() {
      this.qualiFicationLoading = true;
      this.$http({
        url: "/sys/web/userinfo/findcertification",
        method: "get",
        params: {
          userId: this.userId,
          pageNo: this.qualiFicationPageNo,
          pageSize: this.qualiFicationPageSize,
        },
      }).then(({ data }) => {
        // console.log("资质证书",data);
        if (data) {
          this.qualiFicationTable = data.certificationList;
          this.qualiFicationLoading = false;
          this.qualiFicationTotal = data.totalCount;
        }
      });
    },
    // 资质证书 新增、编辑确定
    saveQualiFication() {
      this.$refs.qualiFicationList.validate((valid) => {
        if (valid) {
          this.$http({
            url: "/sys/web/userinfo/savecertification",
            method: "post",
            params: {
              id: this.qualiFicationList.id,
              user: this.userId,
              certificationdescribe: this.qualiFicationList.describe,
              certificationfile: this.qualiFicationList.certificate,
            },
          }).then(({ data }) => {
            console.log("新增资质证书", data);
            if (data && data.success) {
              this.qualiFicationDialog = false;
              this.getfindcertification();
              this.qualiFicationList.describe = "";
              this.qualiFicationList.certificate = "";
              this.qualiFicationList.fileList = [];
            }
          });
        }
      });
    },
    //资质证书 编辑
    redactqualiFication(val) {
      console.log(val);
      this.qualiFicationDialog = true;
      this.qualiFicationList.fileList = [];
      this.qualiFicationList.describe = val.certificationdescribe;
      this.qualiFicationList.describe = val.certificationdescribe;
      this.qualiFicationList.certificate = val.certificationfile;
      this.qualiFicationList.id=val.id;
      this.qualiFicationList.certificate.split("|").forEach((item) => {
        if (item.trim().length > 0) {
          this.qualiFicationList.fileList.push({
            name: decodeURIComponent(item.substring(item.lastIndexOf("/") + 1)),
            url: item,
          });
        }
      });
    },
    // 资质证书 删除
    deleteQualiFication(id) {
      let ids = "";
      if (this.checkqualiFication.length > 0) {
        ids = this.checkqualiFication
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/sys/web/userinfo/delcertification",
          method: "post",
          params: { ids: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getfindcertification();
        });
      });
    },
    // 资质证书 选中
    qualiFicationChange(val) {
      this.checkqualiFication = val;
    },
    // ---------------------------------------------

    // ---------------------------------------------
    //体检报告分页
    findMedicalHandleSize(val) {
      this.findMedicalPageSize = val;
      this.findMedicalPageNo = 1;
      this.getfindMedical();
    },
    findMedicalHandleCurrent(val) {
      this.findMedicalPageNo = val;
      this.getfindMedical();
    },
    // 体检报告 查询
    getfindMedical() {
      this.findMedicalLoading = true;
      this.$http({
        url: "/sys/web/userinfo/findmedical",
        method: "get",
        params: {
          userId: this.userId,
          pageNo: this.findMedicalPageNo,
          pageSize: this.findMedicalPageSize,
        },
      }).then(({ data }) => {
        // console.log("体检报告",data);
        if (data) {
          this.findMedicalTable = data.healthList;
          this.findMedicalLoading = false;
          this.findMedicalTotal = data.totalCount;
        }
      });
    },
    // 体检报告新增、编辑 确定
    saveFindMedical() {
      this.$refs.findMedicalList.validate((valid) => {
        if (valid) {
          this.$http({
            url: "/sys/web/userinfo/savemedical",
            method: "post",
            params: {
              id: this.findMedicalList.id,
              user: this.userId,
              medicalname: this.findMedicalList.medicalname,
              medicaldate: this.findMedicalList.medicaldate,
              summary: this.findMedicalList.summary,
              medicalarea: this.findMedicalList.medicalarea,
              detailedaddress: this.findMedicalList.detailedaddress,
              level: this.findMedicalList.level,
              medicaltype: this.findMedicalList.medicaltype,
            },
          }).then(({ data }) => {
            // console.log("新增体检报告",data);
            if (data && data.success) {
              this.findMedicalDialog = false;
              this.getfindMedical();
              this.findMedicalList.medicalname = "";
              this.findMedicalList.medicaldate = "";
              this.findMedicalList.summary = "";
              this.findMedicalList.medicalarea = "";
              this.findMedicalList.detailedaddress = "";
              this.findMedicalList.level = "";
              this.findMedicalList.medicaltype = "";
            }
          });
        }
      });
    },
    //体检报告 编辑
    redactfindMedical(row) {
      this.findMedicalList.id = row.id;
      this.findMedicalList.medicalname = row.medicalname;
      this.findMedicalList.medicaldate = row.medicaldate;
      this.findMedicalList.summary = row.summary;
      this.findMedicalList.medicalarea = row.medicalarea;
      this.findMedicalList.detailedaddress = row.detailedaddress;
      this.findMedicalList.level = row.level;
      this.findMedicalList.medicaltype = row.medicaltype;
      this.findMedicalDialog = true;
    },
    //体检报告 删除
    deleteFindMedical(id) {
      let ids = "";
      if (this.checkfindMedical.length > 0) {
        ids = this.checkfindMedical
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/sys/web/userinfo/delmedical",
          method: "post",
          params: { ids: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getfindMedical();
        });
      });
    },
    // 体检报告选中
    findMedicalChange(val) {
      this.checkfindMedical = val;
    },
    // ---------------------------------------------

    // ---------------------------------------------
    //工伤记录分页
    findUserInjuryHandleSize(val) {
      this.findUserInjuryPageSize = val;
      this.findUserInjuryPageNo = 1;
      this.getfindUserInjury();
    },
    findUserInjuryHandleCurrent(val) {
      this.findUserInjuryPageNo = val;
      this.getfindUserInjury();
    },
    // 工伤记录 查询
    getfindUserInjury() {
      this.findUserInjuryLoading = true;
      this.$http({
        url: "/sys/person/findUserInjury",
        method: "get",
        params: {
          userId: this.userId,
          pageNo: this.findUserInjuryPageNo,
          pageSize: this.findUserInjuryPageSize,
        },
      }).then(({ data }) => {
        // console.log("工伤记录",data);
        if (data) {
          this.findUserInjuryTable = data.injuryList;
          this.findUserInjuryLoading = false;
          this.findUserInjuryTotal = data.totalCount;
        }
      });
    },
    // 工伤新增 确定
    savaFindUserInjury() {
      this.$http({
        url: "/sys/person/saveUserInjury",
        method: "post",
        params: {
          id: this.findUserInjuryList.id,
          user: this.userId,
          time: this.findUserInjuryList.time,
          commercialocation: this.findUserInjuryList.commercialocation,
          businesslevel: this.findUserInjuryList.businesslevel,
          medicaldiagnosis: this.findUserInjuryList.medicaldiagnosis,
          medicaldiagnosisresult:
            this.findUserInjuryList.medicaldiagnosisresult,
        },
      }).then(({ data }) => {
        // console.log("新增工伤",data);
        if (data && data.success) {
          this.findUserInjuryDialog = false;
          this.getfindUserInjury();
          (this.findUserInjuryList.id = ""),
            (this.findUserInjuryList.time = "");
          this.findUserInjuryList.commercialocation = "";
          this.findUserInjuryList.businesslevel = "";
          this.findUserInjuryList.medicaldiagnosis = "";
          this.findUserInjuryList.medicaldiagnosisresult = "";
          this.findUserInjuryList.fileList = [];
        }
      });
    },
    // 工伤编辑
    redactfindUserInjury(val) {
      // console.log(val)
      this.findUserInjuryList = val;
      this.findUserInjuryList.fileList = [];
      this.findUserInjuryList.medicaldiagnosis = val.medicaldiagnosis;
      this.findUserInjuryList.medicaldiagnosis.split("|").forEach((item) => {
        if (item.trim().length > 0) {
          this.findUserInjuryList.fileList.push({
            name: decodeURIComponent(item.substring(item.lastIndexOf("/") + 1)),
            url: item,
          });
        }
      });
      this.findUserInjuryDialog = true;
    },
    // 工伤删除
    deleteFindUserInjury(id) {
      let ids = "";
      if (this.checkfindUserInjury.length > 0) {
        ids = this.checkfindUserInjury
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/sys/person/deleteUserInjury",
          method: "post",
          params: { injuryIds: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getfindUserInjury();
        });
      });
    },
    // 工伤记录选中
    findUserInjuryChange(val) {
      this.checkfindUserInjury = val;
    },

    // ---------------------------------------------

    // ---------------------------------------------
    //工资日期改变重新调用
    payrollPicker(val) {
      this.payrollPickerValue = val;
      this.getfindsalary();
    },
    // 工资表分页
    payrollHandleSize(val) {
      this.payrollPageNo = 1;
      this.payrollPageSize = val;
      this.getfindsalary();
    },
    payrollHandleCurrent(val) {
      this.payrollPageNo = val;
      this.getfindsalary();
    },
    // 查询工资表
    getfindsalary() {
      this.payrollloading = true;
      this.$http({
        url: "/sys/web/userinfo/findsalary",
        method: "get",
        params: {
          userId: this.userId,
          salyear: this.payrollPickerValue,
          pageNo: this.payrollPageNo,
          pageSize: this.payrollPageSize,
        },
      }).then(({ data }) => {
        // console.log("工资表",data);
        if (data) {
          this.payrollTable = data.page;
          this.payrollTotal = data.totalCount;
          this.payrollloading = false;
        }
      });
    },
    //增加薪资的姓名下拉选
    get_userIdList() {
      this.addEdit = true;
      this.$http({
        url: "/sys/web/userinfo/findUserById",
        method: "get",
        params: {
          userId: this.userId,
        },
      }).then(({ data }) => {
        // console.log("编辑薪资",data);
        if (data && data.success) {
          if (this.userIdList.bankaccount != "") {
            this.addSalaryByUser.bankaccount = this.userIdList.bankaccount;
          }
          if (this.userIdList.bankofdeposit != "") {
            this.addSalaryByUser.bankofdeposit = this.userIdList.bankofdeposit;
          }
          if (this.userIdList.banknumber != "") {
            this.addSalaryByUser.banknumber = this.userIdList.banknumber;
          }
        }
      });
    },
    //添加时执行的方法
    addSalarys() {
      this.addSalaryByUserDialog = true;
      this.$refs.addSalaryByUser.validate((valid) => {
        if (valid) {
          this.$http({
            url: "/sys/web/userinfo/savaSalary",
            method: "post",
            params: {
              // "id":this.addSalaryByUser.id,
              user: this.userId,
              username: this.addSalaryByUser.username,
              salyear: this.addSalaryByUser.salyear,
              bankofdeposit: this.addSalaryByUser.bankofdeposit,
              banknumber: this.addSalaryByUser.banknumber,
              bankaccount: this.addSalaryByUser.bankaccount,
              department: this.addSalaryByUser.department,
              job: this.addSalaryByUser.job.id,
              idnumber: this.addSalaryByUser.idnumber.id,
              companyname: this.addSalaryByUser.companyname,
              idcard: this.addSalaryByUser.idcard,
              phone: this.addSalaryByUser.phone,
              shouldattendanceday: this.addSalaryByUser.shouldattendanceday,
              traveldays: this.addSalaryByUser.traveldays,
              leavedays: this.addSalaryByUser.leavedays,
              realityattendanceday: Number(
                this.addSalaryByUser.shouldattendanceday -
                  this.addSalaryByUser.traveldays -
                  this.addSalaryByUser.leavedays
              ),
              basepay: this.addSalaryByUser.basepay,
              postwage: this.addSalaryByUser.postwage,
              meritpay: this.addSalaryByUser.meritpay,
              combinedbasic:
                Number(this.addSalaryByUser.basepay) +
                Number(this.addSalaryByUser.postwage) +
                Number(this.addSalaryByUser.meritpay),
              senioritypay: this.addSalaryByUser.senioritypay,
              mealallowance: this.addSalaryByUser.mealallowance,
              trafficallowance: this.addSalaryByUser.trafficallowance,
              commission: this.addSalaryByUser.commission,
              travelallowance: this.addSalaryByUser.travelallowance,
              attendancebonus: this.addSalaryByUser.attendancebonus,
              overtime: this.addSalaryByUser.overtime,
              communicatesubsidy: this.addSalaryByUser.communicatesubsidy,
              othersupport: this.addSalaryByUser.othersupport,
              totalwelfarebenefits:
                Number(this.addSalaryByUser.senioritypay) +
                Number(this.addSalaryByUser.mealallowance) +
                Number(this.addSalaryByUser.trafficallowance) +
                Number(this.addSalaryByUser.commission) +
                Number(this.addSalaryByUser.travelallowance) +
                Number(this.addSalaryByUser.attendancebonus) +
                Number(this.addSalaryByUser.overtime) +
                Number(this.addSalaryByUser.communicatesubsidy) +
                Number(this.addSalaryByUser.othersupport),
              shouldsalary:
                Number(this.addSalaryByUser.basepay) +
                Number(this.addSalaryByUser.postwage) +
                Number(this.addSalaryByUser.meritpay) +
                (Number(this.addSalaryByUser.senioritypay) +
                  Number(this.addSalaryByUser.mealallowance) +
                  Number(this.addSalaryByUser.trafficallowance) +
                  Number(this.addSalaryByUser.commission) +
                  Number(this.addSalaryByUser.travelallowance) +
                  Number(this.addSalaryByUser.attendancebonus) +
                  Number(this.addSalaryByUser.overtime) +
                  Number(this.addSalaryByUser.communicatesubsidy) +
                  Number(this.addSalaryByUser.othersupport)),
              basicoldagepension: this.addSalaryByUser.basicoldagepension,
              basicmedicalcare: this.addSalaryByUser.basicmedicalcare,
              unemploymentinsurance: this.addSalaryByUser.unemploymentinsurance,
              housingprovidentfund: this.addSalaryByUser.housingprovidentfund,
              individualincometax: this.addSalaryByUser.individualincometax,
              lately: this.addSalaryByUser.lately,
              leaveearly: this.addSalaryByUser.leaveearly,
              absenteeism: this.addSalaryByUser.absenteeism,
              otherdeductions: this.addSalaryByUser.otherdeductions,
              party: this.addSalaryByUser.party,
              workInjury: this.addSalaryByUser.workInjury,
              providentFund: this.addSalaryByUser.providentFund,
              pension: this.addSalaryByUser.pension,
              medical: this.addSalaryByUser.medical,
              unemployment: this.addSalaryByUser.unemployment,
              businessInjury: this.addSalaryByUser.businessInjury,
              otherFee: this.addSalaryByUser.otherFee,
              deductionscombined:
                Number(this.addSalaryByUser.basicoldagepension) +
                Number(this.addSalaryByUser.basicmedicalcare) +
                Number(this.addSalaryByUser.unemploymentinsurance) +
                Number(this.addSalaryByUser.housingprovidentfund) +
                Number(this.addSalaryByUser.individualincometax) +
                Number(this.addSalaryByUser.lately) +
                Number(this.addSalaryByUser.leaveearly) +
                Number(this.addSalaryByUser.absenteeism) +
                Number(this.addSalaryByUser.otherdeductions) +
                Number(this.addSalaryByUser.party) +
                Number(this.addSalaryByUser.workInjury),
              totalFees:
                Number(this.addSalaryByUser.providentFund) +
                Number(this.addSalaryByUser.pension) +
                Number(this.addSalaryByUser.medical) +
                Number(this.addSalaryByUser.unemployment) +
                Number(this.addSalaryByUser.businessInjury) +
                Number(this.addSalaryByUser.otherFee),
              netpayroll:
                Number(this.addSalaryByUser.basepay) +
                Number(this.addSalaryByUser.postwage) +
                Number(this.addSalaryByUser.meritpay) +
                (Number(this.addSalaryByUser.senioritypay) +
                  Number(this.addSalaryByUser.mealallowance) +
                  Number(this.addSalaryByUser.trafficallowance) +
                  Number(this.addSalaryByUser.commission) +
                  Number(this.addSalaryByUser.travelallowance) +
                  Number(this.addSalaryByUser.attendancebonus) +
                  Number(this.addSalaryByUser.overtime) +
                  Number(this.addSalaryByUser.communicatesubsidy) +
                  Number(this.addSalaryByUser.othersupport)) -
                (Number(this.addSalaryByUser.basicoldagepension) +
                  Number(this.addSalaryByUser.basicmedicalcare) +
                  Number(this.addSalaryByUser.unemploymentinsurance) +
                  Number(this.addSalaryByUser.housingprovidentfund) +
                  Number(this.addSalaryByUser.individualincometax) +
                  Number(this.addSalaryByUser.lately) +
                  Number(this.addSalaryByUser.leaveearly) +
                  Number(this.addSalaryByUser.absenteeism) +
                  Number(this.addSalaryByUser.otherdeductions) +
                  Number(this.addSalaryByUser.party) +
                  Number(this.addSalaryByUser.workInjury)),
            },
          }).then(({ data }) => {
            console.log("工资表", data);
            if (data && data.success) {
              this.addSalaryByUserDialog = false;
              this.addSalaryByUser.id = "";
              this.addSalaryByUser.salyear = "";
              // this.addSalaryByUser.username="";
              this.addSalaryByUser.companyname = "";
              // this.addSalaryByUser.idcard="";
              this.addSalaryByUser.idnumber = "";
              this.addSalaryByUser.job = "";
              // this.addSalaryByUser.phone="";
              this.addSalaryByUser.user = "";
              this.addSalaryByUser.bankofdeposit = "";
              this.addSalaryByUser.bankaccount = "";
              this.addSalaryByUser.banknumber = "";
              this.addSalaryByUser.shouldattendanceday = "";
              this.addSalaryByUser.traveldays = "";
              this.addSalaryByUser.leavedays = "";
              this.addSalaryByUser.realityattendanceday = "";
              this.addSalaryByUser.basepay = "";
              this.addSalaryByUser.postwage = "";
              this.addSalaryByUser.meritpay = "";
              this.addSalaryByUser.combinedbasic = "";
              this.addSalaryByUser.senioritypay = "";
              this.addSalaryByUser.mealallowance = "";
              this.addSalaryByUser.trafficallowance = "";
              this.addSalaryByUser.commission = "";
              this.addSalaryByUser.travelallowance = "";
              this.addSalaryByUser.attendancebonus = "";
              this.addSalaryByUser.overtime = "";
              this.addSalaryByUser.communicatesubsidy = "";
              this.addSalaryByUser.othersupport = "";
              this.addSalaryByUser.totalwelfarebenefits = "";
              this.addSalaryByUser.shouldsalary = "";
              this.addSalaryByUser.basicoldagepension = "";
              this.addSalaryByUser.basicmedicalcare = "";
              this.addSalaryByUser.unemploymentinsurance = "";
              this.addSalaryByUser.housingprovidentfund = "";
              this.addSalaryByUser.individualincometax = "";
              this.addSalaryByUser.lately = "";
              this.addSalaryByUser.leaveearly = "";
              this.addSalaryByUser.absenteeism = "";
              this.addSalaryByUser.party = "";
              this.addSalaryByUser.workInjury = "";
              this.addSalaryByUser.otherdeductions = "";
              this.addSalaryByUser.deductionscombined = "";
              this.addSalaryByUser.netpayroll = "";
              this.addSalaryByUser.providentFund = "";
              this.addSalaryByUser.pension = "";
              this.addSalaryByUser.medical = "";
              this.addSalaryByUser.unemployment = "";
              this.addSalaryByUser.businessInjury = "";
              this.addSalaryByUser.otherFee = "";
              this.addSalaryByUser.totalFees = "";
              this.getfindsalary();
            }
          });
        }
      });
    },
    //编辑
    editSalarys() {
      this.addSalaryByUserDialog = true;
      this.$refs.addSalaryByUser.validate((valid) => {
        if (valid) {
          var date = new Date();
          var year = date.getFullYear();
          var month = date.getMonth() + 1;
          var strDate = date.getDate();
          if (month >= 1 && month <= 9) {
            month = "0" + month;
          }
          if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
          }
          var hh = date.getHours();
          var mf =
            date.getMinutes() < 10
              ? "0" + date.getMinutes()
              : date.getMinutes();
          var ss =
            date.getSeconds() < 10
              ? "0" + date.getSeconds()
              : date.getSeconds();
          this.$http({
            url: "/sys/web/userinfo/savaSalary",
            method: "post",
            params: {
              createBy: this.addSalaryByUser.createBy.id,
              createDate:
                year +
                "/" +
                month +
                "/" +
                strDate +
                " " +
                hh +
                ":" +
                mf +
                ":" +
                ss,
              updateBy: this.addSalaryByUser.updateBy.id,
              updateDate:
                year +
                "/" +
                month +
                "/" +
                strDate +
                " " +
                hh +
                ":" +
                mf +
                ":" +
                ss,
              id: this.addSalaryByUser.id,
              user: this.userId,
              username: this.addSalaryByUser.username,
              salyear: this.addSalaryByUser.salyear,
              bankofdeposit: this.addSalaryByUser.bankofdeposit,
              banknumber: this.addSalaryByUser.banknumber,
              bankaccount: this.addSalaryByUser.bankaccount,
              department: this.addSalaryByUser.department,
              job: this.addSalaryByUser.job.id,
              idnumber: this.addSalaryByUser.idnumber.id,
              companyname: this.addSalaryByUser.companyname.id,
              idcard: this.addSalaryByUser.idcard,
              phone: this.addSalaryByUser.phone,
              shouldattendanceday: this.addSalaryByUser.shouldattendanceday,
              traveldays: this.addSalaryByUser.traveldays,
              leavedays: this.addSalaryByUser.leavedays,
              realityattendanceday: Number(
                this.addSalaryByUser.shouldattendanceday -
                  this.addSalaryByUser.traveldays -
                  this.addSalaryByUser.leavedays
              ),
              basepay: this.addSalaryByUser.basepay,
              postwage: this.addSalaryByUser.postwage,
              meritpay: this.addSalaryByUser.meritpay,
              combinedbasic:
                Number(this.addSalaryByUser.basepay) +
                Number(this.addSalaryByUser.postwage) +
                Number(this.addSalaryByUser.meritpay),
              senioritypay: this.addSalaryByUser.senioritypay,
              mealallowance: this.addSalaryByUser.mealallowance,
              trafficallowance: this.addSalaryByUser.trafficallowance,
              commission: this.addSalaryByUser.commission,
              travelallowance: this.addSalaryByUser.travelallowance,
              attendancebonus: this.addSalaryByUser.attendancebonus,
              overtime: this.addSalaryByUser.overtime,
              communicatesubsidy: this.addSalaryByUser.communicatesubsidy,
              othersupport: this.addSalaryByUser.othersupport,
              totalwelfarebenefits:
                Number(this.addSalaryByUser.senioritypay) +
                Number(this.addSalaryByUser.mealallowance) +
                Number(this.addSalaryByUser.trafficallowance) +
                Number(this.addSalaryByUser.commission) +
                Number(this.addSalaryByUser.travelallowance) +
                Number(this.addSalaryByUser.attendancebonus) +
                Number(this.addSalaryByUser.overtime) +
                Number(this.addSalaryByUser.communicatesubsidy) +
                Number(this.addSalaryByUser.othersupport),
              shouldsalary:
                Number(this.addSalaryByUser.basepay) +
                Number(this.addSalaryByUser.postwage) +
                Number(this.addSalaryByUser.meritpay) +
                (Number(this.addSalaryByUser.senioritypay) +
                  Number(this.addSalaryByUser.mealallowance) +
                  Number(this.addSalaryByUser.trafficallowance) +
                  Number(this.addSalaryByUser.commission) +
                  Number(this.addSalaryByUser.travelallowance) +
                  Number(this.addSalaryByUser.attendancebonus) +
                  Number(this.addSalaryByUser.overtime) +
                  Number(this.addSalaryByUser.communicatesubsidy) +
                  Number(this.addSalaryByUser.othersupport)),
              basicoldagepension: this.addSalaryByUser.basicoldagepension,
              basicmedicalcare: this.addSalaryByUser.basicmedicalcare,
              unemploymentinsurance: this.addSalaryByUser.unemploymentinsurance,
              housingprovidentfund: this.addSalaryByUser.housingprovidentfund,
              individualincometax: this.addSalaryByUser.individualincometax,
              lately: this.addSalaryByUser.lately,
              leaveearly: this.addSalaryByUser.leaveearly,
              absenteeism: this.addSalaryByUser.absenteeism,
              otherdeductions: this.addSalaryByUser.otherdeductions,
              party: this.addSalaryByUser.party,
              workInjury: this.addSalaryByUser.workInjury,
              providentFund: this.addSalaryByUser.providentFund,
              pension: this.addSalaryByUser.pension,
              medical: this.addSalaryByUser.medical,
              unemployment: this.addSalaryByUser.unemployment,
              businessInjury: this.addSalaryByUser.businessInjury,
              otherFee: this.addSalaryByUser.otherFee,
              deductionscombined:
                Number(this.addSalaryByUser.basicoldagepension) +
                Number(this.addSalaryByUser.basicmedicalcare) +
                Number(this.addSalaryByUser.unemploymentinsurance) +
                Number(this.addSalaryByUser.housingprovidentfund) +
                Number(this.addSalaryByUser.individualincometax) +
                Number(this.addSalaryByUser.lately) +
                Number(this.addSalaryByUser.leaveearly) +
                Number(this.addSalaryByUser.absenteeism) +
                Number(this.addSalaryByUser.otherdeductions) +
                Number(this.addSalaryByUser.party) +
                Number(this.addSalaryByUser.workInjury),
              totalFees:
                Number(this.addSalaryByUser.providentFund) +
                Number(this.addSalaryByUser.pension) +
                Number(this.addSalaryByUser.medical) +
                Number(this.addSalaryByUser.unemployment) +
                Number(this.addSalaryByUser.businessInjury) +
                Number(this.addSalaryByUser.otherFee),
              netpayroll:
                Number(this.addSalaryByUser.basepay) +
                Number(this.addSalaryByUser.postwage) +
                Number(this.addSalaryByUser.meritpay) +
                (Number(this.addSalaryByUser.senioritypay) +
                  Number(this.addSalaryByUser.mealallowance) +
                  Number(this.addSalaryByUser.trafficallowance) +
                  Number(this.addSalaryByUser.commission) +
                  Number(this.addSalaryByUser.travelallowance) +
                  Number(this.addSalaryByUser.attendancebonus) +
                  Number(this.addSalaryByUser.overtime) +
                  Number(this.addSalaryByUser.communicatesubsidy) +
                  Number(this.addSalaryByUser.othersupport)) -
                (Number(this.addSalaryByUser.basicoldagepension) +
                  Number(this.addSalaryByUser.basicmedicalcare) +
                  Number(this.addSalaryByUser.unemploymentinsurance) +
                  Number(this.addSalaryByUser.housingprovidentfund) +
                  Number(this.addSalaryByUser.individualincometax) +
                  Number(this.addSalaryByUser.lately) +
                  Number(this.addSalaryByUser.leaveearly) +
                  Number(this.addSalaryByUser.absenteeism) +
                  Number(this.addSalaryByUser.otherdeductions) +
                  Number(this.addSalaryByUser.party) +
                  Number(this.addSalaryByUser.workInjury)),
            },
          }).then(({ data }) => {
            console.log("工资表", data);
            if (data && data.success) {
              this.addSalaryByUserDialog = false;
              this.addSalaryByUser.id = "";
              this.addSalaryByUser.salyear = "";
              // this.addSalaryByUser.username="";
              this.addSalaryByUser.companyname = "";
              // this.addSalaryByUser.idcard="";
              this.addSalaryByUser.idnumber = "";
              this.addSalaryByUser.job = "";
              // this.addSalaryByUser.phone="";
              this.addSalaryByUser.user = "";
              this.addSalaryByUser.bankofdeposit = "";
              this.addSalaryByUser.bankaccount = "";
              this.addSalaryByUser.banknumber = "";
              this.addSalaryByUser.shouldattendanceday = "";
              this.addSalaryByUser.traveldays = "";
              this.addSalaryByUser.leavedays = "";
              this.addSalaryByUser.realityattendanceday = "";
              this.addSalaryByUser.basepay = "";
              this.addSalaryByUser.postwage = "";
              this.addSalaryByUser.meritpay = "";
              this.addSalaryByUser.combinedbasic = "";
              this.addSalaryByUser.senioritypay = "";
              this.addSalaryByUser.mealallowance = "";
              this.addSalaryByUser.trafficallowance = "";
              this.addSalaryByUser.commission = "";
              this.addSalaryByUser.travelallowance = "";
              this.addSalaryByUser.attendancebonus = "";
              this.addSalaryByUser.overtime = "";
              this.addSalaryByUser.communicatesubsidy = "";
              this.addSalaryByUser.othersupport = "";
              this.addSalaryByUser.totalwelfarebenefits = "";
              this.addSalaryByUser.shouldsalary = "";
              this.addSalaryByUser.basicoldagepension = "";
              this.addSalaryByUser.basicmedicalcare = "";
              this.addSalaryByUser.unemploymentinsurance = "";
              this.addSalaryByUser.housingprovidentfund = "";
              this.addSalaryByUser.individualincometax = "";
              this.addSalaryByUser.lately = "";
              this.addSalaryByUser.leaveearly = "";
              this.addSalaryByUser.absenteeism = "";
              this.addSalaryByUser.party = "";
              this.addSalaryByUser.workInjury = "";
              this.addSalaryByUser.otherdeductions = "";
              this.addSalaryByUser.deductionscombined = "";
              this.addSalaryByUser.netpayroll = "";
              this.addSalaryByUser.providentFund = "";
              this.addSalaryByUser.pension = "";
              this.addSalaryByUser.medical = "";
              this.addSalaryByUser.unemployment = "";
              this.addSalaryByUser.businessInjury = "";
              this.addSalaryByUser.otherFee = "";
              this.addSalaryByUser.totalFees = "";
              this.getfindsalary();
            }
          });
        }
      });
    },
    // 编辑工资表
    redactpayroll(val) {
      this.addEdit = true;
      this.$http({
        url: "/sys/web/userinfo/findUserById",
        method: "get",
        params: {
          userId: this.userId,
        },
      }).then(({ data }) => {
        console.log("编辑薪资", data);
        if (data && data.success) {
          if (data.user.bankaccount != "") {
            this.addSalaryByUser.bankaccount = data.user.bankaccount;
          }
          if (data.user.bankofdeposit != "") {
            this.addSalaryByUser.bankofdeposit = data.user.bankofdeposit;
          }
          if (data.user.banknumber != "") {
            this.addSalaryByUser.banknumber = data.user.banknumber;
          }
          this.addSalaryByUser.job = data.user.post;
          console.log(this.addSalaryByUser.job);
        }
      });
      console.log(val);
      this.addSalaryByUser.id = val.id;
      this.addSalaryByUser.createBy = val.createBy;
      this.addSalaryByUser.updateBy = val.updateBy;
      this.addSalaryByUser.salyear = val.salyear;
      this.addSalaryByUser.username = val.username;
      this.addSalaryByUser.companyname = val.companyname;
      this.addSalaryByUser.idcard = val.idcard;
      this.addSalaryByUser.idnumber = val.idnumber;
      this.addSalaryByUser.job = val.job;
      this.addSalaryByUser.phone = val.phone;
      this.addSalaryByUser.user = val.user;
      // this.addSalaryByUser.bankofdeposit=val.bankofdeposit;
      // this.addSalaryByUser.bankaccount=val.bankaccount;
      // this.addSalaryByUser.banknumber=val.banknumber;
      this.addSalaryByUser.shouldattendanceday = val.shouldattendanceday;
      this.addSalaryByUser.traveldays = val.traveldays;
      this.addSalaryByUser.leavedays = val.leavedays;
      this.addSalaryByUser.realityattendanceday = val.realityattendanceday;
      this.addSalaryByUser.basepay = val.basepay;
      this.addSalaryByUser.postwage = val.postwage;
      this.addSalaryByUser.meritpay = val.meritpay;
      this.addSalaryByUser.combinedbasic = val.combinedbasic;
      this.addSalaryByUser.senioritypay = val.senioritypay;
      this.addSalaryByUser.mealallowance = val.mealallowance;
      this.addSalaryByUser.trafficallowance = val.trafficallowance;
      this.addSalaryByUser.commission = val.commission;
      this.addSalaryByUser.travelallowance = val.travelallowance;
      this.addSalaryByUser.attendancebonus = val.attendancebonus;
      this.addSalaryByUser.overtime = val.overtime;
      this.addSalaryByUser.communicatesubsidy = val.communicatesubsidy;
      this.addSalaryByUser.othersupport = val.othersupport;
      this.addSalaryByUser.totalwelfarebenefits = val.totalwelfarebenefits;
      this.addSalaryByUser.shouldsalary = val.shouldsalary;
      this.addSalaryByUser.basicoldagepension = val.basicoldagepension;
      this.addSalaryByUser.basicmedicalcare = val.basicmedicalcare;
      this.addSalaryByUser.unemploymentinsurance = val.unemploymentinsurance;
      this.addSalaryByUser.housingprovidentfund = val.housingprovidentfund;
      this.addSalaryByUser.individualincometax = val.individualincometax;
      this.addSalaryByUser.lately = val.lately;
      this.addSalaryByUser.leaveearly = val.leaveearly;
      this.addSalaryByUser.absenteeism = val.absenteeism;
      this.addSalaryByUser.party = val.party;
      this.addSalaryByUser.workInjury = val.workInjury;
      this.addSalaryByUser.otherdeductions = val.otherdeductions;
      this.addSalaryByUser.deductionscombined = val.deductionscombined;
      this.addSalaryByUser.netpayroll = val.netpayroll;
      this.addSalaryByUser.providentFund = val.providentFund;
      this.addSalaryByUser.pension = val.pension;
      this.addSalaryByUser.medical = val.medical;
      this.addSalaryByUser.unemployment = val.unemployment;
      this.addSalaryByUser.businessInjury = val.businessInjury;
      this.addSalaryByUser.otherFee = val.otherFee;
      this.addSalaryByUser.totalFees = val.totalFees;
      this.addSalaryByUserDialog = true;
      // totalFees:"",//企业费用合计
    },
    // 删除 工资表
    delpayroll(id) {
      let ids = "";
      if (this.checkpayroll.length > 0) {
        ids = this.checkpayroll
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/sys/web/userinfo/delSalary",
          method: "post",
          params: { salaryIds: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getfindsalary();
        });
      });
    },
    // 工资表选项卡
    payrolls(val) {
      this.checkpayroll = val;
    },
    // ---------------------------------------------

    // ---------------------------------------------
    //公积金日期改变重新调用
    accumulationFundPicker(val) {
      this.accumulationFundPickerValue = val;
      this.getAccumulationFund();
    },
    //查询公积金
    getAccumulationFund() {
      this.accumulationLoading = true;
      this.$http({
        url: "/sys/person/findUserAccumulation",
        method: "get",
        params: {
          date: this.accumulationFundPickerValue,
          userId: this.userId,
        },
      }).then(({ data }) => {
        // console.log("公积金",data);
        if (data) {
          this.accumulationFundTable = data.userAccumulation;
          this.accumulationLoading = false;
        }
      });
    },
    //新增公积金
    accumulationFundHealt() {
      this.$http({
        url: "/sys/person/saveUserAccumulation",
        method: "post",
        params: {
          id: this.accumulationFundList.id,
          paytime: this.accumulationFundList.paytime,
          userinformation: this.userId,
          accountstatus: this.accumulationFundList.accountstatus,
          depositbase: this.accumulationFundList.depositbase,
          companydepositratio: this.accumulationFundList.companydepositratio,
          companymonthlydeposit:
            this.accumulationFundList.companymonthlydeposit,
          personaldepositratio: this.accumulationFundList.personaldepositratio,
          personalmonthlydeposit:
            this.accumulationFundList.personalmonthlydeposit,
          accountbalance: this.accumulationFundList.accountbalance,
        },
      }).then(({ data }) => {
        // console.log("公积金添加页面",data);
        if (data && data.success) {
          this.$message.success(data.msg);
          this.accumulationFundDialog = false;
          this.$refs["accumulationFundList"].resetFields();
          this.getAccumulationFund();
        }
      });
    },
    //编辑公积金
    EditaccumulationFund(row) {
      this.accumulationFundList = row;
      this.accumulationFundDialog = true;
    },
    //删除
    delaccumulationFund(id) {
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/sys/person/deleteUserAccumulation",
          method: "post",
          params: { fundIds: id },
        }).then(({ data }) => {
          if (data && data.success) {
            this.$message.success(data.msg);
            this.getAccumulationFund();
          }
        });
      });
    },
    // ---------------------------------------------

    // ---------------------------------------------
    //社保分页
    socialSecurityHandleSize(val) {
      this.socialSecurityPageNo = 1;
      this.socialSecurityPageSize = val;
      this.getSocialSecuCompany();
    },
    socialSecurityHandleCurrent(val) {
      this.socialSecurityPageNo = val;
      this.getSocialSecuCompany();
    },
    //社保日期改变重新调用
    asocialSecurityPicker(val) {
      this.socialSecurityPickerValue = val;
      this.getSocialSecuCompany();
    },
    //查询社保
    getSocialSecuCompany() {
      this.socialSecurityloading = true;
      this.$http({
        url: "/sys/web/userinfo/findsocial",
        method: "get",
        params: {
          paytime: this.socialSecurityPickerValue,
          userId: this.userId,
          pageNo: this.socialSecurityPageNo,
          pageSize: this.socialSecurityPageSize,
        },
      }).then(({ data }) => {
        // console.log("社保",data);
        if (data) {
          this.socialSecurityTable = data.page;
          this.socialSecurityTotal = data.totalCount;
          this.socialSecurityloading = false;
        }
      });
    },
    //社保 确定
    socialSecurityHealt() {
      this.$http({
        url: "/sys/web/userinfo/savesocial",
        method: "post",
        params: {
          id: this.socialSecurityList.id,
          paytime: this.socialSecurityList.paytime,
          user: this.userId,
          pension: this.socialSecurityList.pension,
          medicalcare: this.socialSecurityList.medicalcare,
          unemployment: this.socialSecurityList.unemployment,
          birth: this.socialSecurityList.birth,
          workhurt: this.socialSecurityList.workhurt,
        },
      }).then(({ data }) => {
        // console.log("社保添加页面",data);
        if (data && data.success) {
          this.$message.success(data.msg);
          this.socialSecurityDialog = false;
          this.$refs["socialSecurityList"].resetFields();
          this.getSocialSecuCompany();
        }
      });
    },
    //社保当前行编辑按钮
    redactSocialSecurity(row) {
      this.socialSecurityList = row;
      this.socialSecurityDialog = true;
    },
    //社保选项卡
    socialSecuritys(val) {
      this.checkSocialSecuritys = val;
    },
    //社保删除按钮
    delSocialSecuritys(id) {
      let ids = "";
      if (this.checkSocialSecuritys.length > 0) {
        ids = this.checkSocialSecuritys
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/sys/web/userinfo/delsocial",
          method: "post",
          params: { socialIds: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getSocialSecuCompany();
        });
      });
    },
    //--------------------------------------------------------

    //--------------------------------------------------------
    //查询合同
    selectUserContract() {
      this.contractLoading = true;
      this.$http({
        url: "/sys/web/userinfo/findcontractuser",
        method: "get",
        params: {
          userId: this.userId,
        },
      }).then(({ data }) => {
        // console.log("合同",data);
        if (data) {
          this.contractTable = data.list;
          this.contractLoading = false;
        }
      });
    },
    //--------------------------------------------------------

    //--------------------------------------------------------
    // 工作经历分页
    workenterpriseHandleSize(val) {
      this.workenterprisePageNo = 1;
      this.workenterprisePageSize = val;
      this.getWorkenterprise();
    },
    workenterpriseHandleCurrent(val) {
      this.workenterprisePageNo = val;
      this.getWorkenterprise();
    },
    // 查询工作经历
    getWorkenterprise() {
      this.workenterpriseloading = true;
      this.$http({
        url: "/sys/web/userinfo/findworkenterprise",
        method: "get",
        params: {
          paytime: this.workenterprisePickerValue,
          userId: this.userId,
          pageNo: this.workenterprisePageNo,
          pageSize: this.workenterprisePageSize,
        },
      }).then(({ data }) => {
        // console.log("工作经历",data);
        if (data) {
          this.workenterpriseTable = data.workList;
          this.workenterpriseTotal = data.totalCount;
          this.workenterpriseloading = false;
        }
      });
    },
    // 工作经历 新增、编辑确定
    workenterpriseHealt() {
      this.$http({
        url: "/sys/web/userinfo/saveworkenterprise",
        method: "post",
        params: {
          id: this.workenterpriseList.id,
          user: this.userId,
          postname: this.workenterpriseList.postname,
          companyname: this.workenterpriseList.companyname,
          starttime: this.workenterpriseList.starttime,
          endtime: this.workenterpriseList.endtime,
          departement: this.workenterpriseList.departement,
          worktype: this.workenterpriseList.worktype,
          workexperience: this.workenterpriseList.workexperience,
          witness: this.workenterpriseList.witness,
          witnesscontact: this.workenterpriseList.witnesscontact,
          iscontract: this.workenterpriseList.iscontract,
        },
      }).then(({ data }) => {
        if (data && data.success) {
          this.$message.success(data.msg);
          this.workenterpriseDialog = false;
          this.$refs["workenterpriseList"].resetFields();
          this.getWorkenterprise();
        }
      });
    },
    // 工作经历 编辑
    redactworkenterprise(val) {
      // console.log(val)
      this.workenterpriseList = val;
      this.workenterpriseDialog = true;
    },
    // 工作经历删除
    delworkenterprise(id) {
      let ids = "";
      if (this.checkWorkenterprise.length > 0) {
        ids = this.checkWorkenterprise
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/sys/web/userinfo/delworkenterprise",
          method: "post",
          params: { ids: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getWorkenterprise();
        });
      });
    },
    // 工作经历选项卡
    workenterprises(val) {
      this.checkWorkenterprise = val;
    },
    //--------------------------------------------------------

    //--------------------------------------------------------
    // 家庭状况分页
    familystatusHandleSize(val) {
      this.familystatusPageNo = 1;
      this.familystatusPageSize = val;
      this.getFamilystatus();
    },
    familystatusHandleCurrent(val) {
      this.familystatusPageNo = val;
      this.getFamilystatus();
    },
    // 查询家庭状况
    getFamilystatus() {
      this.familystatusloading = true;
      this.$http({
        url: "/sys/web/userinfo/findfamily",
        method: "get",
        params: {
          userId: this.userId,
          pageNo: this.familystatusPageNo,
          pageSize: this.familystatusPageSize,
        },
      }).then(({ data }) => {
        // console.log("家庭状况",data);
        if (data) {
          this.familystatusTable = data.familyList;
          this.familystatusTotal = data.totalCount;
          this.familystatusloading = false;
        }
      });
    },
    // 家庭状况新增、编辑 确定
    familystatusHealt() {
      this.$http({
        url: "/sys/web/userinfo/savafamily",
        method: "post",
        params: {
          id: this.familystatusList.id,
          userinfo: this.userId,
          name: this.familystatusList.name,
          birthday: this.familystatusList.birthday,
          relationship: this.familystatusList.relationship,
          workcompany: this.familystatusList.workcompany,
          position: this.familystatusList.position,
          isretire: this.familystatusList.isretire,
          education: this.familystatusList.education,
          phone: this.familystatusList.phone,
        },
      }).then(({ data }) => {
        if (data && data.success) {
          this.$message.success(data.msg);
          this.familystatusDialog = false;
          this.$refs["familystatusList"].resetFields();
          this.getFamilystatus();
        }
      });
    },
    // 编辑家庭状况
    redactfamilystatus(val) {
      this.familystatusList = val;
      this.familystatusDialog = true;
    },
    // 删除 家庭状况
    delfamilystatus(id) {
      let ids = "";
      if (this.checkFamilystatus.length > 0) {
        ids = this.checkFamilystatus
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/sys/web/userinfo/delfamily",
          method: "post",
          params: { ids: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getFamilystatus();
        });
      });
    },
    // 家庭状况选项卡
    familystatuss(val) {
      this.checkFamilystatus = val;
    },
    //--------------------------------------------------------

    // ------------------------------------------------------
    // 考勤记录分页
    attendanceRecordSize(val) {
      this.familystatusPageNo = 1;
      this.familystatusPageSize = val;
      this.getFamilystatus();
    },
    attendanceRecordCurrent(val) {
      this.familystatusPageNo = val;
      this.getFamilystatus();
    },
    //考勤时间
    attendanceRecordPicker(val) {
      this.attendanceRecordValue = val;
      this.getAttendanceRecord();
    },
    //考勤记录查询
    getAttendanceRecord() {
      this.attendanceRecordLoading = true;
      this.$http({
        url: "/sys/person/findUserCheckin",
        method: "get",
        params: {
          time: this.attendanceRecordValue,
          userId: this.userId,
        },
      }).then(({ data }) => {
        // console.log("考勤记录",data);
        if (data) {
          this.attendanceRecordTable = data.checkinList;
          this.attendanceRecordLoading = false;
        }
      });
    },
    // ------------------------------------------------------
  },
};
</script>